Q.– Given:-
public class Vowel {
private char var;
public static void main(String[ ] args) {
char var1 = 'a';
char var2 = var1;
var2 = 'e';
Vowel obj1 = new Vowel();
Vowel obj2 = obj1;
obj1.var = 'o';
obj2.var = 'i';
System.out.println (var1 + ", " +var2) ;
System.out.println (obj1. var + ", " + obj2.var);
}
}
What is the result?
A) e, e
i, i
B) a, a
o, o
C) a, e
i, i
D) a, e
o, o
⧪ please give your answer in a comment section.
public class Vowel {
private char var;
public static void main(String[ ] args) {
char var1 = 'a';
char var2 = var1;
var2 = 'e';
Vowel obj1 = new Vowel();
Vowel obj2 = obj1;
obj1.var = 'o';
obj2.var = 'i';
System.out.println (var1 + ", " +var2) ;
System.out.println (obj1. var + ", " + obj2.var);
}
}
What is the result?
A) e, e
i, i
B) a, a
o, o
C) a, e
i, i
D) a, e
o, o
⧪ please give your answer in a comment section.
3 Comments
B
ReplyDeleteB
ReplyDeleteit's C
ReplyDelete