Data Types and Variables Determine output:public class Test{ int a = 10; public void method(int a){ a += 1; System.out.println(++a); } public static void main(String args[]){ Test t = new Test(); t.method(3); }} 4 12 11 5 None of these 4 12 11 5 None of these ANSWER DOWNLOAD EXAMIANS APP
Data Types and Variables Which of the following automatic type conversion will be possible? short to int long to int byte to int int to long short to int long to int byte to int int to long ANSWER DOWNLOAD EXAMIANS APP
Data Types and Variables What is the output for the below code ?1. public class Test{2. public static void main(String[] args){3. int i = 010;4. int j = 07;5. System.out.println(i);6. System.out.println(j);7. }8. } 10 7 None of these Compilation fails with an error at line 5 8 7 Compilation fails with an error at line 3 10 7 None of these Compilation fails with an error at line 5 8 7 Compilation fails with an error at line 3 ANSWER DOWNLOAD EXAMIANS APP
Data Types and Variables What is the output for the below code?public class Test{ int _$; int $7; int do; public static void main(String argv[]){ Test test = new Test(); test.$7=7; test.do=9; System.out.println(test.$7); System.out.println(test.do); System.out.println(test._$); }} None of these 7 0 0 7 9 0 Compile error - $7 is not valid identifier. Compile error - do is not valid identifier. None of these 7 0 0 7 9 0 Compile error - $7 is not valid identifier. Compile error - do is not valid identifier. ANSWER DOWNLOAD EXAMIANS APP
Data Types and Variables In Java, the word true is ................ Same as value 0 A Java keyword A Boolean literal Same as value 1 Same as value 0 A Java keyword A Boolean literal Same as value 1 ANSWER DOWNLOAD EXAMIANS APP
Data Types and Variables Determine output:class A{ public static void main(String args[]){ int x; x = 10; if(x == 10){ int y = 20; System.out.print("x and y: "+ x + " " + y); y = x*2; } y = 100; System.out.print("x and y: " + x + " " + y); }} 10 20 10 100 10 20 10 10 Error 10 20 10 20 10 20 10 100 10 20 10 10 Error 10 20 10 20 ANSWER DOWNLOAD EXAMIANS APP