Consider the following Student class. class Student { privat…

Consider the following Student class. class Student { private String name; private int age; public Student(String studentName, int studentAge) { name = studentName; studentAge = age; }} The following code segment appears in the Main class: Student myStudent = new Student(“Bobby”, 25); Which of the following best describes the state of the object myStudent as a result of executing this code segment?

Consider the following class definition. class Widget { priv…

Consider the following class definition. class Widget { private int number; private static String word = “start”; public Widget() { /* implementation not shown */ }} The following code segment appears in the Main class: int result = Widget.doSomething(); Which of the following implementations of doSomething will allow this code segment to run without error when added to the Widget class?