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); }} 11 4 5 12 None of these 11 4 5 12 None of these ANSWER DOWNLOAD EXAMIANS APP
Data Types and Variables How many primitive data types are there in Java? 8 9 7 6 8 9 7 6 ANSWER DOWNLOAD EXAMIANS APP
Data Types and Variables The following program:public class Test{ static boolean isOK; public static void main(String args[]){ System.out.print(isOK); } } Prints false Prints true Will not compile as boolean is not initialized Will not compile as boolean can never be static Prints false Prints true Will not compile as boolean is not initialized Will not compile as boolean can never be static 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. byte b = 6;4. b+=8;5. System.out.println(b);6. b = b+7;7. System.out.println(b);8. }9. } Compilation fails with an error at line 6 Compilation fails with an error at line 4 14 13 None of these 14 21 Compilation fails with an error at line 6 Compilation fails with an error at line 4 14 13 None of these 14 21 ANSWER DOWNLOAD EXAMIANS APP
Data Types and Variables Java is a ........... language. weakly typed strongly typed None of these moderate typed weakly typed strongly typed None of these moderate typed ANSWER DOWNLOAD EXAMIANS APP
Data Types and Variables Determine output:public class Test{int i = 34;public static void main(String args[]){Test t1 = new Test();Test t2 = new Test();t1.i = 65;System.out.print(t1.i);System.out.print(t2.i);}} 34 65 65 65 65 34 34 34 34 65 65 65 65 34 34 34 ANSWER DOWNLOAD EXAMIANS APP