Software

What is a Type Wrapper or simply a Wrapper in Java?
A Wrapper class is an object version of Primitive Data Type
A Wrapper provides additional methods for ease of use
Wrapper types are useful for using with generic collections
All the above
What will be the output of the following Java program?
a. True false true
b. False false false
c. False true true
d. True true false
What will be the output of the following Java program?
a. 257.0
b. 0
c. 257
D. 1
Choose the correct statement about Character wrapper class in Java?
a. Character class has static methods toUpperCase(char), toLowerCase(char)
Character class has static methods isDigit(char), isLetter(char)
Character class has static method valueOf(char) to convert char to Character.
All the above
Standard output variable ‘out’ is defined in which class?
Void
Runtime
Process
System
Which of these method of class String is used to remove leading and trailing whitespaces?
Trim()
Trim()
StartsWith()
DoTrim()
What will be the output of the following Java program?
Hewlo
Hello
Hewwo
Helwo
What will be the output of the following Java program?
Hello
Worl
World
Hell
What will be the output of the following Java program?
4 9
5 8
5 9
4 8
What will be the output of the following Java code?
True
1
False
0
Output=
AACCBB
AABBCC
CCAABB
CCBBAA
Output=
59
57
50
90
0
4
2
None of the mentioned
Which of the following class definitions defines a legal abstract class?
Class A { abstract void unfinished() { } }
Class A { abstract void unfinished(); }
Public class abstract A { abstract void unfinished(); }
abstract class A { abstract void unfinished(); }
Public class School{ public abstract double numberOfStudent(); } which of the following statements is true?
The method numberOfStudent() in class School must have a body.
The keywords public and abstract cannot be used together.
Class School must be defined abstract.
You must add a return statement in method numberOfStudent().
Why do we need to handle exceptions?
To prevent abnormal termination of program
To avoid syntax errors
To encourage exception prone program
To save memory
Which is the universal exception handler class?
Object
Errors
Exceptions
Math
Java Compiler translates the source code into?
JVM code
Machine code
Assembly code
Byte code
What does polymorphism in OOPs mean?
Concept of keeping things in different modules/files
Concept of allowing overriding of functions
Concept of wrapping things into a single unit
Concept of hiding data
Which concept allows you to reuse the written code?
Abstraction
Polymorphism
Inheritance
Encapsulation
Which of the following statements regarding abstract classes are true?
A subclass can override a concrete method in a superclass to declare it abstract.
A subclass of a non-abstract superclass can be abstract
An abstract class can be extended
All of the above
Which of these can be used to fully abstract a class from its implementation?
Objects
Packages
Interfaces
None of the Mentioned
{"name":"Software", "url":"https://www.quiz-maker.com/QPREVIEW","txt":"What is a Type Wrapper or simply a Wrapper in Java?, What will be the output of the following Java program?, What will be the output of the following Java program?","img":"https://www.quiz-maker.com/3012/CDN/96-4742270/image.png?sz=1200"}
Make your own Survey
- it's free to start.