Data Types and Variables The following program:public class Test{ static boolean isOK; public static void main(String args[]){ System.out.print(isOK); } } Will not compile as boolean can never be static Will not compile as boolean is not initialized Prints true Prints false Will not compile as boolean can never be static Will not compile as boolean is not initialized Prints true Prints false ANSWER DOWNLOAD EXAMIANS APP
Data Types and Variables Java is a ........... language. weakly typed None of these moderate typed strongly typed weakly typed None of these moderate typed strongly typed 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); }} float Compilation Error double Exception is thrown at runtime float Compilation Error double Exception is thrown at runtime 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 20 10 20 10 10 Error 10 20 10 100 10 20 10 20 10 20 10 10 Error 10 20 10 100 ANSWER DOWNLOAD EXAMIANS APP
Data Types and Variables Size of float and double in Java is 64 and 32 32 and 64 32 and 32 64 and 64 64 and 32 32 and 64 32 and 32 64 and 64 ANSWER DOWNLOAD EXAMIANS APP
Data Types and Variables Size of int in Java is 64 bit Depends on execution environment 16 bit 32 bit 64 bit Depends on execution environment 16 bit 32 bit ANSWER DOWNLOAD EXAMIANS APP