Question: Which statement is TRUE for the following code? public class A f { private void display ( ) { System.out.printIn ( GeeksforGeeks )
Which statement is TRUE for the following code?
public class
private void display
System.out.printInGeeksforGeeks;
class B
public static void mainString args
A obj new ;
obj.display;
The display method of Class A cannot be called using the object, obj.
The source code is in the file, Bjava".
An object of Class A cannot be created using new A
It will be running without any errors.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
