java 2017

1. Java is :

 
 
 
 

2. This is not a primitive data type in java :

 
 
 
 

3. Java Does not have this :

 
 
 
 

4. Java virtual Machine is basically a :

 
 
 
 

5. Applets are created to run primarily on :

 
 
 
 

6. A Break Statement can not be used inside a :

 
 
 
 

7. This Statement does nothing :

 

 
 
 
 

8. What will be output of this code ?

String a [];

b=new String[4];

System.out.println(a[2]);

 
 
 
 

9. What is output of this code ?

double x=100/17;

System.out.println(x);

 
 
 
 

10. In Java, all types are always passed by :

 
 
 
 

11. Insted of ‘goto’ of C++ java providers:

 
 
 
 

12. Method used to obtain information about an object are known as :

 
 
 
 

13. Concat method can be used to concatenate :

 
 
 
 

14. This kind of java operators have minimum precedence with respect to all operators :

 
 
 
 

15. What is the value of ‘a’ after execution of this code ?

int a=23, b=34;

a=((a<b)?(b+a):(b-a));

 
 
 
 

16. import java.io.*;

Here import statement is asking java compiler to include all public classes from package :

 
 
 
 

17. Which operations can be performed on string objects ?

 
 
 
 

18. Minimum number of statements in aĀ  block can be :

 
 
 
 

19. Which code makes ‘a’ equal to 8?

  1. Ā intĀ  a =32;

a=a>>2;

2.Ā  int a =33;

a=a>>2;

3.Ā  int a =35;

a=a>>2;

4. int a=16;

a=a>>1;

 

 

 
 
 
 

20. this is not related to web technology :

 
 
 
 

21. This is not Active X Scripting language :

 
 
 
 

22. The Program ProvidingĀ  an Active X document can be a :

 
 
 
 

23. I StorageĀ  is used for providing

 
 
 
 

24. Hypertext is composed of :

 
 
 
 

25. In ASP request form reads data sent from :

 
 
 
 

26. The Primary Java Compiler inĀ  JDK is :

 
 
 
 

27. The Number Of bytes needed to store a number of type ‘double ‘ is :

 
 
 
 

28. This/these Operator/Operators does not/don’t always evaluate all its/their operands :

 
 
 
 

29. LetĀ  A beĀ  a class

Let B be a subclass of A

Let x be a B object

The condition x instance of A :

 
 
 
 

30. What is the output of this program ?

int m=1

for (;m<20;m++)

System.out.println(m+=1+m);

 
 
 
 

31. If we use ‘ ‘ as a character constant ,it will be :

 
 
 
 

32. This statement will give Compilation error :

 
 
 
 

33. Program which execute applet is know as :

 
 
 
 

34. We use Array as a parameter of main method because :

 
 
 
 

35. This method executes only once :

 
 
 
 

36. x=x+1 is equivalent to :

 
 
 
 

37. Super is the predefined :

 
 
 
 

38. Java Intermediate code is called :

 
 
 
 

39. This is predefined package :

 
 
 
 

40. Java Interpretation is done using :

 
 
 
 

41. Which statement result in compilation error ?

  1. int a =(short)7.5;
  2. short a=(int)7.5;
  3. byte a=(int)7.5;
 
 
 
 

42. Which is not a java modifier?

 
 
 
 

43. Consider this code :

if(a>b)

System.out.println(“a”);

else

System.out.println(“b”);

System.out.println(“c”);

When will ‘c’ get printed ?

 
 
 
 

44. This is invalid declaration of aĀ  local variable :

 
 
 
 

45. What is the output of this statement ?

System.out.println(“Hello”+4+9);

 
 
 
 

46. How can we print ‘x’ with this code ?

if (a>b)

if(b>c)

if(a<=c)

System.out.println(“x”);

else

System.out.println(“y”);

 
 
 
 

47. This operator is used to concatenate two or more string objects :

 
 
 
 

48. This method of string class is used to obtain length of string object :

 
 
 
 

49. This Data type value is returned by equals () method of String class :

 
 
 
 

50. Which statement is invalid

 
 
 
 

51. This is not a java keyword :

 
 
 
 

52. a.x(z);

In the above statement , this is true :

 
 
 
 

53. The Output of this program is :

public class guru

{

public static void main(String []args)

{

int i=18;

{

intĀ  i=15;

System.out.println(“i”);

}}}

 
 
 
 

54. What is the output of this program ?

public class c{

public int d(int m){

System.out.println(m+m);

return m;

}

public static void main(String []args)

{

System.out.print(d(7));

}

}

 
 
 
 

55. While Loop Controlled By :

 
 
 
 

56. In Java , Nesting of if -else statement is :

 
 
 
 

57. this knid of Loop can never get into infinite iteration time :

 
 
 
 

58. Instead of Multiple inheritance ,java provide :

 
 
 
 

59. Java Object are created by :

 
 
 
 

60. What is wrong in this program ?

public class A

{

Public static void main(String []args)

{

boolean []b=new boolean[10];

system.out.print(b.length());

}

}

 

 
 
 
 

61. What is wrong in this program ?

public class x{

public static void main(string []args){

String s = “abcde”;

System.out.print (s.length());

}}

 
 
 
 

62. What is the output of the following program ?

public class cale{

public static void main(String []args)

{

int a=45,b=10,c=2;

System.out.println(a/b/c);

}

}

 
 
 
 

63. The super class of panel class is :

 
 
 
 

64. The Container with title bar And menu bar is :

 
 
 
 

65. This is not a part of GUI :

 
 
 
 

66. This is the way to declared a Button Class in AWT :

 
 
 
 

67. AWT panel can not have this /these :

 
 
 
 

68. ASP interpreter reads and executes all script code between :

 
 
 
 

69. HTTP is this kind of protocol:

 
 
 
 

70. With Active X Support , Active X Scripting Language /languages is/are :

 
 
 
 

71. The application/applications using ActiveX controls is /are :

 
 
 
 

72. Microsoft Excel Sheet can be edited within a power using :

 
 
 
 

73. This is false :

 
 
 
 

74. Total Bytes property of ASP request does this :

 
 
 
 

75. URL stands for :

 
 
 
 

76. This is environment variable contains a list of directories where java looks for classes reference in a program:

 
 
 
 

77. Null is an Object :

 
 
 
 

78. Which is not correct :

 
 
 
 

79. Garbage Collector helps us for :

 
 
 
 

80. the Result of -17%-3 is :

 
 
 
 

81. This is incorrect statement:

 
 
 
 

82. What is the output of this program ?

public class C {

 

public static int computer(int a, int b)

{

if(b==0)

return a ;

return computer(b,a%b);

}

public static void main(String []args){

System.out.print(c.computer(77,252));}}

 
 
 
 

83. What is the output of this code ?

double a =0.0/0.0;

system.out.println(a);

 
 
 
 

84. How Many times will while loop in this code run?

public class c{

public static void main(String []args)

{

char ch=’a’;

while(ch++ <=’z’)

System.out.print(–ch);

}}

 
 
 
 

85. Which Operators associate from right to left ?

 
 
 
 

86. To give a label to a loop , the label is placed at:

 
 
 
 

87. A java string is :

 
 
 
 

88. ‘color ‘ class is part of this package:

 
 
 
 

89. This kind of statement is used to access package :

 
 
 
 

90. If this statement is used is a java program ,what is the output ?

public static void Main(string []args)

 
 
 
 

91. What is false about main method ?

 
 
 
 

92. Static method belong to :

 
 
 
 

93. Which is not true about Abstract class?

 
 
 
 

94. A Continue statement returns control to :

 
 
 
 

95. Layout Manager Managers not defined in java awt package is /are

 
 
 
 

96. This method changes label of a button :

 
 
 
 

97. TheĀ  self-registration of Active X controls is done by using function :

 
 
 
 

98. A Container can manage the lifetime of an Active X Control using:

 
 
 
 

99. HTTP can be used to exchange :

 
 
 
 

100. HTTP is this kind of protocol :

 
 
 
 

Question 1 of 100

Leave a Reply

Your email address will not be published. Required fields are marked *