Q1 JAVA does not supportA. pointers B. global variables C. multiple inheritance D. all of the above |
Q2 An expressionA. usually evaluates to a numerical B. may be a part of a statement C. always occurs outside of a function D. both a&b |
Q3 in JAVA, a function contained with in a class is called___A. a member function B. an operator C. a class function D. a method |
Q5 The dot operator connects the following 2 entities(reading from left to right)A. a class member & class object B. a class object &a class C. a class & a member of that class D. a class object & a member of that class |
Q6 classes are useful because theyA. permit data to be hidden from other classes B. bring together all aspects of an entity in one plan C. can closely model objects in the real word D. all of the above |
Q7 which of the following expressions result in a positive value in xA. int x=-1;x>>>5; B. int x=-1;x=x>>>32 C. byte x=-1;x=x>>>5; D. int x=-1;x>>5; |
Q8 what tags are mandatory when creating HTML to display an appletA. name,hieght,width B. code,name C. codebase,hieght,width D. code,hieght,width |
Q9 Java development kit includeA. appletviewer B. java C. javap D. all of the above |
Q10 Java standard library includes hundreds of classes and methods grouped into __ functional packagesA. 6 B. 7 C. 9 D. 10 |
Q11 class members are _____ by defaultA. private B. protected C. public D. none of the above |
Q12 Java uses____ to destroy a objects created by constructorA. destructor() B. destroyer() C. finalize() D. none of the above |
Q13 Java contains the data typesA. struct B. union C. enum D. none of the above |
Q14 Java adds new operator such as instance of and ___A. >> B. << C. >>> D. <<< |
Q19 new operator is usedA. to dynamically allocate storage B. to statically allocate storage C. to allocate storage for new variable D. none of the above is correct |
Q20 which of the following can legitimately be passed to a functionA. a constant B. a variable C. a structure D. a header file |
Q21 method overloadingA. are a group of function with same name B. all have the same number and type of arguments C. make life simpler for programmer D. may fail unexpectedly due to stress |
Q22 in a class specifier data or function designated private are accessibleA. to any function in the program B. only if you know the password C. to member functions of that class D. only to public members of the class |
Q23 In stack data item placed on the stack first isA. not given an index number B. given the index number 0 C. the first data item to be removed D. the last data item to be removed |
Q24 A floating point constant compriseA. a whole number B. a decimal point C. a fractional part D. all of the above |
Q25 variable name should not be start withA. digit B. uppercase letter C. lowercase letter D. all of the above |
Q26 When Java does the type conversion it is said to beA. automatic type conversion B. artificial type conversion C. virtual type conversion D. all of the above |
Q27 what will be the value if n=1 of x and y after the following is a segment of a program:x=1;y=1;if(n>0) x=x+1;y=Y-1;A. 2,0 B. 1,-1 C. 2,1 D. none of the above |
Q28 In Java this keyword can be used anywhereA. in the object B. in dot notation C. as an argument to a method D. all of the above |
Q29 method definitions have basic partsA. the name of method B. the type of object or primitive type returned by t C. the body of the method D. all of the above |
Q31 constructor method haveA. the same name as the class B. not any return type C. both option 1&2 D. none of the above |
Q32 what is the output of the following program segment for(i=1,j=0;i<10;i++) j+=i;system.out.println("i="+i);A. 10 B. 20 C. 55 D. there is error in program |
Q33 the ? Can be used to replaceA. returns the value B. if then else C. wild characters D. no meaning |
Q34 which one is false incase of vectors in JavaA. can hold objects of any type B. objects of any number C. objects have to be homogenous D. all of the above |
Q35 by using protected one can create class members that are private to their class butA. that can't be inherited and accessed by a derived class B. that can still be inherited and accessed by a derived class C. that can be public D. none of the above |
Q36 the members of a class can be made privateA. declaring them private B. by default they are private C. by declaring them in the beginning of the program immediately after main() D. they are always public |
Q37 which of the following are valid methods in javaA. list.size() B. list.addelement(item) C. list.copyInto(array) D. all of the above |
Q38 vectors can handle primitive data typesA. int.char B. float C. long,double D. none of the above |
Q39 Packages are java's way ofA. grouping a variety of classes and interfaces together B. grouping a variety of classes or interfaces together C. both of the above D. none of the above |
Q40 there are ___ ways of accessing the classes stored in a packageA. only one B. two C. three D. four |
Q41 in java if you want to import all the classes in a package you will useA. import java.awr.* B. import java.awt.all C. import java.awt.every D. none of the above |
Q42 In java which is validA. like classes, interfaces are declared in source files B. like classes,interfaces are also compiled into .class files using the java compiler C. both 1& 2 D. none of the above |
Q43 an end of line is indicated by the followingA. a newline character('\n') B. a carriage return character('\r') C. a carriage return followed by a newline D. all of the above are correct |
Q44 there are following phases in lifecycle of threads in javaA. three B. four C. five D. two |
Q45 a class hierarchyA. shows the same relationships as an organisation chart B. describes "has a" relationships C. describes "is akind of"relationships D. shows the samerelationships as a family tree |
Q46 an array element is accessed usingA. a firstin first out approach B. the dot operator C. a member name D. an index number |
Q47 public,private,protected areA. access keywords B. structure keywords C. exception keyword D. not the keywords |
Q51 Which statement is trueA. java uses stdio.h header file B. java uses string.h header files C. java uses iostream.h header file D. no header files are used in java |
Q52 a static automatic variable is used toA. make a variable visible to several function B. make a variable visible to several function C. converse memory when a function is not executing D. retain a value a function is not executing. |
Q53 In java the class cannot be subclassed is calledA. final class B. finale class C. ultimate class D. no subclass |
Q54 two dimentional can be defined asA. array[4,6] B. array[1..4,1..6] C. array[4][6] D. array(4,6) |
Q55 mathematical functions are supported by java inA. math class B. arithmatic class C. string class D. maths class |
Q56 loop operation are performed byA. if-then-else B. for statement C. while statement D. both 2 &3 |
Q57 in java to get the control out of loop we useA. break B. continue C. both 1 &2 D. goto |
Q58 java is said to be platform independent becauseA. it can be executed on dos B. it can be executed on unix C. it can be executed on windows D. all of the above |
Q59 dynamic memory can be allocated by the following declarationA. new B. volatile C. static D. memory |
Q60 a method that is called automatically when an object is created is known asA. instantiation B. function prototyping C. constructor D. structure |
Q61 a method that automatically when an object is destroyedA. function prototyping B. constructor C. destructor D. finalize |
Q62 special symbol used by java to document java packages and methodsA. doctags B. documenttags C. packagetags D. docpacktags |
Q63 which command is used to genrate API-style HTML documentation automaticallyA. doctag B. javadoc C. javah D. javap |
Q64 a command that disassembles java.class filesA. javac B. javav C. javap D. javad |
Q66 JDK stands forA. java debug kit B. java developer kit C. java database kit D. java documentation kit |
Q67 In java short is data type of lengthA. 8 bits B. 16 bits C. 32 bits D. 4 bits |
Q68 API stands forA. automatic programming interface B. application programming interface C. application programming imbedded D. application pragram interaction |
Q69 class error{ public static void main(string args[]){ system.out.println("hello java!")}A. the output is hello java! B. the output is error C. the output is in two lines D. the output is hello java java |
Q70 which java class supports many methods that enable us to draw many types of shapesA. drawing B. graphs C. graphics D. drawpolygon |
Q74 Java supportsA. multithreading B. automatic garbage collection C. multidimentional array D. Both 1 & 2 |
Q75 Java compose class libraries for applet and networking programmingA. java.awt B. java.applet C. java.net D. all of the above |
Q76 a command for running the java compilerA. javarun B. javado C. javaexecute D. javac |
Q77 a base class is inherited byA. derived class B. inline function C. constructor D. none of the above |