NEW
Font size
WorksheetsQ2LQ
Total questions: 50
Worksheet time: 27mins
Java is a platform-independent programming app known by the term W.O.R.A.
Write Once Run Anywhere
Walk Once Run Anywhere
Write Once, Rewrite Again
Write Once Right Anywhere
Which is NOT a JAVA IDE?
Eclipse
NetBeans
IntelliJ Idea
Notepad
Based on the history of Java what is the name of Java Team Members who initiated the project to develop language for digital devices.
Blue Team
Green Team
Yellow Team
None of the above
______________ is a Canadian computer scientist, best known as the founder and lead designer behind the Java programming language.
Steve Jobs
Bills Gates
James Gosling
None of the above
Java is a popular programming language, created in the year?
1992
1998
1995
1996
When did JAVA change its name from Oak to JAVA?
1996
1992
1995
1198
Java is owned by _________________.
Oracle Corporation
Microsoft
Adobe
It is a set of steps that are used to help complete a task.
Debugging
Data
Algorithm
None of the above
__________are containers for storing data values.
Variable
Data
String
Int
Which of these methods is given parameters via command line arguments?
main()
recursive() method
Any method
System defined methods
It is the operators that represent if a number is positive or negative.
Arithmetic Operators
Unary Operators
Relational Operators
Increment Operators
How do you create a variable with the numeric value 5?
float x = 5;
x = 5;
int x = 5;
num x = 5
It is used to perform common mathematical operations.
Arithmetic Operators
Unary Operators
Relational Operators
Increment Operators
Which data type is used to create a variable that should store text?
myString
String
Txt
string
How do you create a variable with the floating number 2.8?
byte x = 2.8f
x = 2.8f;
float x = 2.8f;
int x = 2.8f;
Java was originally named:
Coffee
Oak
New C++
Duke
which one this keywords are used to create a class in java
class
struct
int
none of the avove
++ increases the value of a variable by 1
assignment operator
decrement operator
increment operator
sentinel
What was Java originally designed for?
Interactive TV
Internet
Gaming
Cars
%d, %f, %s are called ___________.
Symbol
Format Specifier
Cue
Percent
Find the missing syntax.
{
main
println
);
Find the missing syntax.
{
main
println
);
Find the missing syntax.
{
main
println
);
Find the missing syntax.
{
main
println
);
Find the missing syntax.
out
System.out
;
System
Find the missing syntax.
out
System.out
;
System
What is the output?
150
100
50
200
What is the output?
"Hello"
Hello
Hello;
= Hello
What is the output?
John
Doe
JohnDoe
John Doe
What is the output?
0
20
30
10
__________________ allows a program to take action based on the given condition. It makes your program smarter.
Conditional Statement
Relational operators Statement
Switch Statement
If Statement
__________________ is similar to a conditional statement but only checks for equality and only works with strings, char, int, and enums.
Conditional Statement
Relational operators Statement
Switch Statement
If Statement
Use the ____________ to specify a block of Java code to be executed if a condition is true
Conditional Statement
Relational operators Statement
Switch Statement
If Statement
Use the ____________ to specify a block of code to be executed, if the same condition is false.
Else If Statement
Else Statement
Switch Statement
If Statement
Use the ____________ to specify a new condition to test, if the first condition is false.
Else If Statement
Else Statement
Switch Statement
If Statement
Which of the following is NOT a numeric data type
int
double
float
decimal
We use Scanner Library in java for...
Give permissions to the user
Correcting software errors
Allows user to read data
Allows the user to enter data
Which operator is used to add together two values?
The + sign
The * sign
The & sign
How will you code a single-line comment in java?
/* */
//
**
||
How will you code a multi-line comment in java?
/* */
//
**
||
Is Java short for "JavaScript"?
True
Maybe
False
Sometimes
which of the following is wrapper class in java
Float
Integer
Double
all of above
_________ operator returns the remainder after division
+
/
%
*
________ operator is used to check the equality of two values
>=
=
*=
==
String s1 = "hello";
String s2 = new String("hello");
if (s1 == s2) System.out.print("Hey");
else System.out.print("Yo");
What is the output?
Hey
Yo
There is no output.
This code will not compile.
Int data types represents _______ bits.
8
16
32
64
int x = 5;
int y = 6
int z = 50;
System.out.println(x + y + z);
What will be the output?
61
5650
66
x + y + z
Which of the following is the right way of defining char variable?
char myGrade = 'B';
char myGrade = "B";
char myGrade 'B';
char myGrade = "B"
JDK stands for
Java Developer Kit
Java Development Kit
Java Design Kit
Java Debugging Kit
