Вы находитесь на странице: 1из 5

SD2

1. Byte data type can take following range of values (a) 128 to 127 (b) 32768 to 32767 (c) 2,147,483,648 to 2,147,483,647 (d) 922,3372026854775808 to 922,3372026854775807 If any class implements an interface but does not provide implementation for every method of interface then it must be declared as (a) Abstract (b) Static (c) Final (d) Public JVM stands for (a) Java Verifying Machine (b) Java Virtual Machine (c) Java Validation Machine (d) None of the above int in Java always occupies (a) 8 bit (b) 16 bit (c) 32 bit (d) Vendor specific The part of Java Program which encloses the entire program is known as (a) Class Definition (b) Method Definition (c) Package Definition (d) None of the above Java Interpreter is called (a) Java (b) Java Executer (c) Java Runnable (d) None of the above Primitive Data Type in Java is (a) Objects (b) Generated with the help of some other data type (c) Built in Data Type (d) None of the above The total different Data type of Integer in Java are (a) 2 (b) 3 (c) 4 (d) >4 9. int data type can take following range of values (a) 128 to 127 (b) 32768 to 32767 (c) 2,147,483,648 to 2,147,483,647 (d) None of the above float data type can hold (a) 6-7 significant decimal of digit (b) 9-10 significant decimal of digit (c) 15-17 significant decimal of digit (d) None of the above double data type can hold (a) 6-7 significant decimal of digit (b) 9-10 significant decimal of digit (c) 15 significant decimal of digit (d) None of the above Unicode Code Scheme (a) Represents all characters written in English Language (b) Represents all characters written in European Language (c) Represents all characters written in All Language (d) None of the above The number of characters currently in use are (a) 32,767 (b) 255 (c) 35000 (d) 65,536 The code set which supports 1 byte is (a) ASCII Code Scheme (b) Unicode Code Scheme (c) GSM (d) None of the above Java uses (a) ASCII Code (b) Unicode Set (c) Both (a) and (b) (d) None of the above >>>=is the symbol of (a) Left Shift Assignment (b) Right Shift Assignment (c) Zero fill Right Shift Assignment (d) None of the above

10.

2.

11.

3.

12.

4.

5.

13.

6.

14.

7.

15.

8.

16.

XIX

(1)

SD2
17. The Operator which returns true if both sides in an expression is true ia (a) AND (b) OR (c) XOR (d) None of the above 18. The Operator which increments variables value by 1 then uses, known as (a) PreIncrement Operator (b) Post Increment Operator (c) Pre Step Increment Operator (d) Post Step Increment Operator 19. Array can Only be used after (a) Initialization (b) Declaration (c) Both (a) and (b) (d) None of the above 20. String Class is defined in the package (a) java.lang (b) java.net (c) java.awt (d) java.util 21. The method of String class to compare two String objects is (a) isequal() (b) equals() (c) isequals() (d) equal() 22. Group of Objects are known as (a) Class (b) Package (c) Module (d) None of the above 23. Object is (a) Concrete Entity (b) Discrete Entity (c) Abstract Entity (d) None of the above 24. Class is (a) Concrete Entity (b) Discrete Entity (c) Abstract Entity (d) None of the above 25. A class is collection of (a) Data (b) Method (c) Both (a) and (b) (d) None of the above 26. The method defined inside the class can be accessed (a) Directly (b) Through Objects (c) Cant be accessed (d) None of the above Subclass is (a) access to the private variable (b) cant access to the private variable (c) Both (a) and (b) (d) None of the these The Process which seals the classs data safely inside the capsule of the class is (a) Abstraction (b) Encapsulation (c) Both (a) and (b) (d) None of the above In Inheritance, the class which uses properties and method of any other class is known as (a) Super Class (b) Derived Class (c) Generic Class (d) None of the above In C ++ Multiple Inheritance leads to (a) Simplicity (b) Complexity (c) Not supported (d) None of the above Polymorphism can be of (a) Static (b) Dynamic (c) Both (a) and (b) (d) None of the above Different version of any particular method can be created by the feature (a) Overloading (b) Overriding (c) Both (a) and (b) (d) None of the above In Java, the following thing is not supported (a) Function Overloading (b) Operator Overloading (c) Function Overriding (d) None of the above The Process in which multiple method must have different arguments (a) Overloading (b) Overriding (c) Both (a) and (b) (d) None of the above

27.

28.

29.

30.

31.

32.

33.

34.

XIX

(2)

SD2
35. The method which are used to set certain properties and perform certain task when constructor is created are known as (a) Constructor (b) Destructor (c) Static (d) None of the above A Class may possess (a) Single Constructor (b) Multiple Constructor (c) No Constructor (d) None of the above Overloading of a Constructor is possible this statement is (a) True (b) False (c) Not Supported (d) None of the above if this() is to be used in any method then (a) can be given any where (b) must be given at end (c) must be given at beginning (d) None of the above The member which can be used independently of any object is known as (a) static (b) nonstatic (c) final (d) protected In case of non static variable each instance can possess (a) Same Value (b) Different Value (c) No Value (d) None of the above final class (a) can not be instantiated (b) can not be subclassed (c) can be subclassed (d) must be subclassed abstract is (a) Identifier (b) Modifier (c) Constant (d) Variable Compile time error occurs if method declaration contains private and (a) static (b) final 44. (c) abstract (d) None of the above Java Provides containers for classes known as (a) Procedure (b) Package (c) Class (d) Object The method belonging to an interface is looked at (a) Compile time (b) Run time (c) Both (a) and (b) (d) None of the above Throwable class extends the following class (a) Root Class (b) Exception Class (c) Error (d) Object A normal condition is denoted by the class (a) Normal (b) Absolute (c) No Error (d) Thread Death charAt() method of String class may throw (a) IndexOutofBoundsException (b) StringIndexOutofBoundsExce ption (c) ArrayIndexOutofBoundsExce ption (d) None of the above ClassNotFoundException can be generated while (a) Using forName() method in the class (b) Using findSystem Class in Class Loader (c) Load Class method in class ClassLoader (d) All of the above The Exception which is generated when a class without definition is tried to be loaded is (a) ClassNotFoundException (b) NotFoundException (c) ClassNotExistException (d) None of the above finally block must be immediately follow

36.

45.

37.

46.

38.

47.

39.

48.

40.

49.

41.

42.

50.

43.

51.

XIX

(3)

SD2
(a) Last try block (b) Last catch block (c) Last throw block (d) None of the above The keyword which is used to raise the exception on a particular condition is (a) try (b) catch (c) throw (d) finally The flow of data can be in terms of (a) bytes (b) Characters (c) Both (a) and (b) (d) None of the above The value of byte returned from read() is in the range of (a) 128 to 127 (b) 0 to 255 (c) 32768 to 32767 (d) 0 to 65536 To read the data from the keyboard java uses (a) System (b) In (c) System.in (d) None of the above File class is used to (a) Creating a new file in Java (b) Read data from the files (c) Handling exceptions while processing files (d) To get or set information or property on different files and directories The method which tests whether the file object denoted by abstract pathname is directory is (a) Directory() (b) isDirectory() (c) existDirectory() (d) None of thee lastModified() method returns a (a) Integer Value (b) String Value (c) Long Value (d) Date Value The thing which must be empty for its deletion is (a) File (b) Directory 60. (c) Both (a) and (b) (d) None of the above The directory which is not included in the list() is (a) SubDirectory (b) Root Directory (c) Parent Directory (d) None of the above If any file cant be opened for reading operation then FileInputStream generates (a) FileDoesNotExistException (b) NullPointerException (c) ClassCastException (d) FileNotFoundException The Bufferedsize of file can be (a) specified (b) default (c) Both (a) and (b) (d) None of the above The class which implements all of the print methods in PrintStream is (a) Printer (b) Writer (c) PrintWriter (d) FileWriter Default encoding of objects protects (a) Public section (b) Private Section (c) Protected Section (d) All of the above For Internet based application following is required (a) Java Application (b) Java Applet (c) Both (a) and (b) (d) None of the above If CodeBase attribute is not present then it takes (a) Space (b) Null (c) Documents URL (d) None of the above The Process which occurs first whenever applet is loaded (a) start() (b) paint() (c) Initialisation (d) None of the above The method which helps the graphical representation of the applet is (a) init()

52.

61.

53.

62.

54.

63.

55.

64.

56.

65.

57.

66.

58.

67.

59.

68.

XIX

(4)

SD2
(b) start() (c) paint() (d) None of the above 69. The method which destroys this thread without any cleanup procedure is (a) stop() (b) destroy() (c) end (d) terminate 70. Java is (a) Implementation Dependent (b) Implementation Independent (c) Vendor Specific Implementation (d) None of the above

XIX

(5)