Data Types and Variables The following fraction of codedouble STATIC = 2.5 ;System.out.println( STATIC ); Raises an exception Prints 2.5 None of these Rraises an error as STATIC is used as a variable which is a keyword Raises an exception Prints 2.5 None of these Rraises an error as STATIC is used as a variable which is a keyword 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 ) ; S 34 S 34 Does not compile as Integer and String are API class names. Throws exception. S 34 S 34 Does not compile as Integer and String are API class names. Throws exception. ANSWER DOWNLOAD EXAMIANS APP
Data Types and Variables Automatic type conversion in Java takes place when Two type are compatible and size of destination type is larger than source type. All of these Two type are compatible and size of destination type is shorter than source type. Two type are compatible and size of destination type is equal of source type. Two type are compatible and size of destination type is larger than source type. All of these Two type are compatible and size of destination type is shorter than source type. Two type are compatible and size of destination type is equal of source type. 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); }} Compilation Error Exception is thrown at runtime double float Compilation Error Exception is thrown at runtime double float 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 Compilation fails with an error at line 3 Compilation fails with an error at line 5 None of these 8 7 10 7 Compilation fails with an error at line 3 Compilation fails with an error at line 5 None of these 8 7 ANSWER DOWNLOAD EXAMIANS APP
Data Types and Variables Size of int in Java is Depends on execution environment 32 bit 64 bit 16 bit Depends on execution environment 32 bit 64 bit 16 bit ANSWER DOWNLOAD EXAMIANS APP