Data Types and Variables How many primitive data types are there in Java? 8 6 9 7 8 6 9 7 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. } 8 7 10 7 None of these Compilation fails with an error at line 3 Compilation fails with an error at line 5 8 7 10 7 None of these Compilation fails with an error at line 3 Compilation fails with an error at line 5 ANSWER DOWNLOAD EXAMIANS APP
Data Types and Variables Size of int in Java is 64 bit 16 bit Depends on execution environment 32 bit 64 bit 16 bit Depends on execution environment 32 bit ANSWER DOWNLOAD EXAMIANS APP
Data Types and Variables What would be the output of the following fraction of code ?int Integer = 34 ;char String = 'S' ;System.out.print( Integer ) ;System.out.print( String ) ; Throws exception. Does not compile as Integer and String are API class names. 34 S 34 S Throws exception. Does not compile as Integer and String are API class names. 34 S 34 S ANSWER DOWNLOAD EXAMIANS APP
Data Types and Variables Determine output:public class Test { static void test(float x){ System.out.print("float"); } static void test(double x){ System.out.print("double"); } public static void main(String[] args){ test(99.9); }} Exception is thrown at runtime double float Compilation Error Exception is thrown at runtime double float Compilation Error ANSWER DOWNLOAD EXAMIANS APP
Data Types and Variables Which of the following automatic type conversion will be possible? long to int byte to int int to long short to int long to int byte to int int to long short to int ANSWER DOWNLOAD EXAMIANS APP