r20 Oops Through Java Bit Bank
r20 Oops Through Java Bit Bank
QUESTIONBANK(OBJECTIVE)
Course & Branch: B.Tech – CSM, CAD & CAI Year & Sem: II-B. Tech & II-Sem
Subject with Code: Object Oriented Programming through Java (20CS0506)
Regulation: R20
UNIT-1
[B ]
17. A function showing many forms is called .
A. 8 B. 16 C. 32 D. 64
[B ]
21 Character data type occupies how many bits in java
A. 8 B. 16 C. 32 D. 64
Float data type occupies how many bits in java. [C ]
22.
A. 8 B. 16 C. 32 D. 64
[A ]
23. Boolean data type occupies how many bits in java.
A. 1 B. 16 C. 32 D. 64
what are the primitive data types. [D ]
24
A. Integers C. Floating point D. Characters D. All
25. Type casting in java usually refers to___ [A ]
A. narrowing type B. widening type C. no type conversation D. None of the
conversations conversations above
26. What are the Type Conversions available in java language? [C ]
A. narrowing type
B. widening type C.A&B D. none of the
conversations
conversations above
27. Which of the following is a type of java Token___ [D ]
A. identifier B. keywords C. operators D. all of these
28. Java keywords also called as .. [C ]
A.Built in words B. reserved in words C. A&B D. none
29. How many keywords available in java [C ]
A. 32 B. 50 C. 51 D. 52
30. provides syntactic representation of Boolean, char, int or string data [B ]
A.keywords B. literals C.variables C. identifiers
31. what are the operators available in java. [D ]
A.arithmetic B. bitwise C. relational D. all
32. What are the java statements____ [D ]
A. selection B. iteration C. jump D. all
33. What is selection Statements? [C ]
A. if B. switch C. both A&B D. none
34. If you want to execute set of statements atleast once which loop you use [B ]
UNIT-3
UNIT-4
1. Which of these type parameters is used for a generic class to return and accept a number? [B ]
A. K B. N C. T D. V
2. Which of the following allows us to call generic methods as a normal method? [D ]
A. Type Interface B. Interface C. Inner class D. All of the
mentioned
3. Which of the following is Faster, String Builder or String Buffer? [A ]
A. String Builder B. String Buffer C. Both of the above D. None of the
above
4. Which of the following reference types cannot be generic? [A ]
A. Anonymous inner B. Interface C. Inner class D. All
Class
5. What is the default value of byte variable? [A ]
A. 0 B. 0.5 C. null D. undefined
6. Which of these types cannot be used to initiate a generic type? [C ]
A. Integer class B. Float Class C. Primitive Types D. Collections
7. Which of these is a correct way of defining of a generic method? [B ]
A. name(T1, T2, …, Tn) B. public name { /* … C .class name[T1, T2, D. name{T1, T2,
{ /* … */ } */ } …, Tn] { /* … */ } …, Tn} { /* … */ }
UNIT-5
Which is a component in AWT that can contain another component like buttons, text fields, [C ]
1.
labelsetc.
A. Window B. Container C. Panel D. Frame
2. What are the different types of controls in AWT? [D ]
A. Labels B.Push buttons C.Check boxes D. All ofThese
3. Give the abbreviation of AWT? [B ]
A.Applet Windowing B.Abstract Windowing C.Absolute Windowing D. None of the
Toolkit Toolkit Toolkit above
Which is the container that doesn't contain title bar and Menu Bars but it can have other [A ]
4.
components like button, text field etc.,
A. Window B. Frame C. Panel D. Container
5. The Swing Component classes that are used in Encapsulates a mutually exclusive set of buttons. [B ]
A. Abstract Button B. Button Group C. J Button D. Image Icon
6. Which package provides many event classes and Listener interfaces for even t handling? [C ]
A. java.awt B. java.awt. Graphics C. java.awt. event D. None
7. Name the class used to represent a GUI application window [D ]
A. Window B. Panel C. Dialog D. Frame
8. TousetheActionListener interface it must be implemented by a class [D ]
A.Creating a new class B. Using the class the C. An anonymous inner D.Allmentioned
graphical component class above
9. Which is used to stored at a and partial results? [C ]
A. Window B. Panel C. Frame D. Container
10. Which class provides many methods for graphics programming? [A ]
A. java.awt B. java. Graphics C. java. awt. Graphics D. None
11. By which method You can set or change the text in a Label? [A ]
A. set Text() B. get Text() C. Both A& B D. None
12. Which class can be used to represent a check box with a textual label that can appear in a menu
[C ]
A. Menu Bar B. Menu Item C. Check box Menu D. Menu
Item
13. It supports pluggable look and feel. It follows MVC (Model View Controller) architectue. [A ]
A. Swing B.AWT C. Both A& B D. None
The Java Foundation Classes (JFC) is a set of GUI components which simplify the
14. [A ]
development of desktop applications?
A.TRUE B.FALSE C. A&B D. None
15. How many types of controls do AWT supports these controls are subclasses of component? [B ]
A.7 B.6 C.5 D.8
16. Which are passive controls that do not support any interaction with the user? [C ]
A. Choice B. List C. Labels D. Checkbox
17. How many ways can we align the label in a container?
[D ]
A.1 B.2 C.3 D.4
18. The following way is used to create a frame is by creating the object of Frame class? [A ]
A. inheritance B. association C. Both A& B D. None
19. Which of the following classes are derived from the Component class.
[A ]
A. Container B. Window C. List D. Menu Item
20. Which of these is not a interface in the Collections Framework? [B ]
A. Collection B. Group C. Set D. List
21 Which of the following is correct about Java8? [D ]
A.Lambda Expression B. Method reference C. Default Method D. All the above
22. How will you call a default method of an interface in a class? [A ]
A.Using super keyword B.Using name of the C.Both of the above D.None of the
along with interface interface above
name.
23. Lambdas introduced in Java 8 allow us to treat . [B ]
A.Data as code B. Code as data C. All D. None
24 The newly introduced Streams API is available in which package of java 8 [C ]
A.java.io. streams B.java.io. stream C.java. util. streams D. java. util.
stream
Which class can be used Instead of System. Get Current Time Millis() to get a date and time in [A ]
25.
Java 8.
A.Clock B. Time C. Date D. Timer
26. Lambda expressions in java 8 are based on. [C ]
A.Procedure B. Data Programming C. Functional D. All
Programming Programming
27. how many methods are there in functional interface in Java 8? [B ]
A.0 B.1 C. 2 D. 3
28. In Java 8 Interfaces, methods can be [D ]
A.Default B. Abstract C. Interface D. all
29. Which package contains Date/Time (JSR 310) API in Java 8 [A ]
A.Java. time B. java. util. time C. java. Time date D. java. util.
calendar
30. Which is new command line tool for the Nash horn JavaScript engine in java 8 [C ]
A.jcs B.jfs C. jjs D. jss
31. Which of these represents a process that accepts one argument and produces a result [A ]
A.Functions B. Process C. Method D. Java
Functions
32. What can help us in avoiding Null Pointe Exceptions and null checks in java 8 [A ]
A.Optional B. Required C. Not Null D. Not Required
33. ode before Java 8 essentially used to be [B ]
A.Declarative B. Imperative C. Subjective D. None
34. What is Predicate in Java 8 [A ]
A.method B. class C. Interface D. Framework
35. Which is aggregate operation in Java 8 [A ]
A.filter B.map C.for Each D. All
36. Which method can be used to check null on an Optional variable in Java 8 [A ]
A.is Present( ) B. is Null able( ) C. is Presentable( ) D. is Not Null( )
37. Functional interfaces method is [B ]
A.static B. abstract C. final D. none
38. Which of these does Stream filter() operates on [A ]
A.Predicate B. Interface C. Class D. Methods
39. Which of these does for Each() operates on [B ]
A. Methods B. Consumer C. Procedure D. Predicate
40. In java 8 Function is ? [B ]
A.Class B. Interface C. Object D. Lambda
Expression