stud
bud
Sign up
Log in
Home
Library
Explore
SAT
More
Java Flashcards | StudBud
Explore
/
Java
Java
20 terms
·
StudBud Administration
Imported from external platform
Flashcards
20 cards
F
Practice quiz
P
Host live
L
Questions
20
Answers
1
There are three common types of loops in Java. Name them.
if, while, else
while, else, switch
if, do-while, for
while, do-while, for
2
Java object oriented programming concepts is/are
All of the above.
Inheritance
polymorphism
Encapsulation
3
Is a relationship in java is related to
Composition
None
Encapsulation
Inheritance
4
Which of the following is not OOPS concept in Java?
Inheritance
Encapsulation
Compilation
Polymorphism
5
Java, python, C# and C++ are examples of
video games
Programming languages
Operating systems
cars
6
‘Whitespace (the space between code) does not affect Java.’ True or False?
False
True
7
Re-usability concepts found in?
Abstraction
Encapsulation
Object
Inheritance
8
Which of the following statement is legal in Java?
float x = 1.34;
char a = 80000;
byte a = 500;
int i_2 = 2001;
9
Which of the following data type requires least memory space in Java?
short
double
long
int
10
Everything in java is an _________
Class
Object
Method
void main
11
Each statement in java should end with a
curly bracket
round bracket
semicolon
quotation
12
Java
it is machine dependent
is not used anymore
needs to be translated
is machine readable code
13
Write a Java method called
factR
to calculate the factorial of a number usingRecursion.
return n * factR(n-1);
public int factR(int n) {
For example: 5! = 1 x 2 x 3 x 4 x 5
if (n==0 || n == 1) return 1;
14
Who developed the java language?
James Josling
John Josling
John Gosling
James Gosling
15
Expand OOPS?
Object Oriented Programming System
Object Oriented Processing Structure
Object Oriented Programming Structure
Object Oriented Processing System
16
What concepts comes under polymorphism in JAVA?
Method overloading
All of the above
Method overriding
Constructor overloading
17
The name of the file in Java must be exactly the same as the name of the class (including case)
True
False
18
Java has this many primitive data types.
10
6
12
8
19
13)Which of the following concepts of OOPS means exposing only necessary information to client?
A. Encapsulation
C. Data hiding
B. Abstraction
D. Data binding
20
Java does not support _______________?
Encapsulation
Single Inheritance
Multiple inheritance for classes
Inheritance