+ 1

Predict the output of following Java program

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

7th Jan 2018, 2:40 PM
Mr.Learner
Mr.Learner - avatar
1 Respuesta
+ 1
40
7th Jan 2018, 2:40 PM
Mr.Learner
Mr.Learner - avatar