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 None of these 12 5 11 4 None of these 12 5 11 ANSWER DOWNLOAD EXAMIANS APP
Data Types and Variables The smallest integer type is ......... and its size is ......... bits. byte, 8 short, 16 short, 16 short, 8 byte, 8 short, 16 short, 16 short, 8 ANSWER DOWNLOAD EXAMIANS APP
Data Types and Variables The following fraction of codedouble STATIC = 2.5 ;System.out.println( STATIC ); None of these Rraises an error as STATIC is used as a variable which is a keyword Prints 2.5 Raises an exception None of these Rraises an error as STATIC is used as a variable which is a keyword Prints 2.5 Raises an exception ANSWER DOWNLOAD EXAMIANS APP
Data Types and Variables In Java byte, short, int and long all of these are unsigned None of these signed Both of the above unsigned None of these signed Both of the above ANSWER DOWNLOAD EXAMIANS APP
Data Types and Variables What is the output of the following program?public class Test{static int x = 10 ; public static void main(String[] a){ Test test = new Test( ) ; Test test1 = new Test( ) ; test.x += 1 ; System.out.println( test.x + test1.x ) ; }} Compilation Error 22 21 20 Throws Exception Compilation Error 22 21 20 Throws Exception ANSWER DOWNLOAD EXAMIANS APP
Data Types and Variables Which of the following automatic type conversion will be possible? long to int int to long short to int byte to int long to int int to long short to int byte to int ANSWER DOWNLOAD EXAMIANS APP