Please help with java, Question 1 Which of the following options is most likely
ID: 3768214 • Letter: P
Question
Please help with java,
Question 1
Which of the following options is most likely to display the name of object obj's class?
System.out.print(obj.name);
System.out.print(obj.class.name);
System.out.print(obj.getName());
System.out.print(obj.getClass().getName());
System.out.print(obj.getClass.getName);
Question 2
_______ classes cannot be directly instantiated and are intended for use only in inheritance hierarchies.
System.out.print(obj.name);
System.out.print(obj.class.name);
System.out.print(obj.getName());
System.out.print(obj.getClass().getName());
System.out.print(obj.getClass.getName);
Explanation / Answer
Question 1:
System.out.print(obj.getClass().getName());
Question 2:
abstract
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.