Predict the output?class T {  int t = 20;}class Main {   public static void main(String args[]) {      T t1 = new T();      System.out.println(t1.t);   }} - Study24x7
Social learning Network

Login

New to Study24X7 ?

 Join Now
659 followers study24x7 23 Mar 2019 12:40 PM study24x7 study24x7

Predict the output?
class T {
  int t = 20;
}
class Main {
   public static void main(String args[]) {
      T t1 = new T();
      System.out.println(t1.t);
   }
}

A

20

B

40

C

Error

D

0

study24x7
Write a comment
Related Questions
500+   more Questions to answer
Most Related Articles