118 views
0

class Sample{
private double num = 1 00;
private int square(int a){
return a*a;

}}
public class Test{
public static void main(String
Sample obj = new Sample0;
System-out-println(obj.num);

}}

Select one:

  •  100
  • Compile time error
  • Executes but no output
  • Run time error
Shubham Haldkar Changed status to publish 1, August ,2024
0
  • Compile time error
Shubham Haldkar Changed status to publish 1, August ,2024
Shopping Basket