Quizzes
Search
Take Quizzes
Animal
Nutrition
Love
Relationship
Computer
Sports
Society
Business
Geography
Language
Personality
Harry Potter
Movie
Television
Music
Online Exam
Health
Country
Art
Entertainment
Celebrity
Math
Game
Book
Fun
Science
Food
History
Education
All Topics
Create a Quiz
Quiz Maker
Training Maker
Survey Maker
Flashcards
Brain Games
See All
ProProfs.com
Search
Create A Quiz
Take Quizzes
Animal
Nutrition
Love
Relationship
Computer
Sports
Society
Business
Geography
Language
Personality
Harry Potter
Movie
Television
Music
Online Exam
Health
Country
Art
Entertainment
Celebrity
Math
Game
Book
Fun
Science
Food
History
Education
All Topics
Products
Quiz Maker
Training Maker
Survey Maker
Flashcards
Brain Games
See All
ProProfs.com
Quizzes
Quizzes
Java - Quiz
42 Questions
|
By Dbhacker9988 | Updated: Feb 14, 2014
| Attempts: 300
Share
Start
Share on Facebook
Share on Twitter
Share on Whatsapp
Share on Pinterest
Share on Email
Copy to Clipboard
Embed on your website
Question
1
/ 42
0 %
0/100
Score
0/100
1.
What is Java (in regard to Computer Science) ?
A type of coffee
AN OBJECT-ORIENTED PROGRAMMING LANGUAGE
Submit
Start Quiz
About This Quiz
Test your Java Skills.
2.
What's your name?
We’ll put your name on your report, certificate, and leaderboard.
2.
WHAT IS AN APPLET?
A JAVA PROGRAM THAT IS RUN THROUGH A WEB BROWSER
A type of coffee
Submit
3.
What is a function in terms of Computer Science ?
A group of code lines that performs a specific task
Something that contains an ‘init’
Submit
4.
Java runs on _______.
Windows
All of the Above
Unix/Linux
Submit
5.
If you want your conditional to depend on two conditions BOTH being true, what is the proper notation to put between the two Boolean statements ?
&&
!!
Submit
6.
What is a loop ?
A new type of Applet
A segment of code to be run a specified amount of times
Submit
7.
What does AWT stands for ?
Abstract window Toolkit
Adjust Window Toolkit
Submit
8.
Booleans are _______.
True or False
Single characters
Submit
9.
Following code will result in: int a = 3.5;
Compilation error
Runtime error
Submit
10.
Synchronized is a keyword to tell a Thread to grab an Object lock before continuing execution.
True
False
Submit
11.
What is the main function of any variable ?
To add numbers together
To keep track of data in the memory of the computer
Submit
12.
What is an assignment statement ?
Assigning a name to a variable
Assigning a value to a variable
Submit
13.
An abstract class can have non-abstract methods
True
False
Submit
14.
Primitive datatypes are allocated on a stack
True
False
Submit
15.
Methods that are marked protected can be called in any subclass of that class.
True
False
Submit
16.
What is the proper way to declare a variable ?
VariableName variableType;
VariableType variableName;
Submit
17.
What's the difference between an Applet and an application ?
Applets can paint words, applications cannot.
Applets are run over the web.
Submit
18.
Inner classes can be defined within methods
True
False
Submit
19.
What is essential in making sure that your loop is not infinite ?
That there is a Boolean statement somewhere in your code
That your Boolean statement will at some point be false
Submit
20.
The methods wait(), notify() and notifyAll() in Object need to be called from synchronized pieces of code.
True
False
Submit
21.
Following code will result in: float a = 9/0
Compilation error: DivideByZeroException
Runtime Exception
Submit
22.
How can you prevent a member variable from becoming serialized?
By marking it volatile
By marking it transient
Submit
23.
Which of the following means that in order for the conditional to happen, either x must be less than 3 or y must be greater than or equal to 4 ?
if ((x < 3) || (y > = 4))
if ((x > 3) || (y < = 4))
Submit
24.
Following code will result in: int a = 9/0;
Compilation error: Divisions must be in a try block.
Runtime Exception
Submit
25.
Following code will result in: class A { int b = 1; public static void main(String [] args) { System.out.println("b is " + b); }}
Compilation error
Runtime Error
Submit
26.
In a 'for' loop, what section of the loop is not included in the parentheses after "for" ?
Loop Body
Initialization
Submit
27.
What is an instanceof
A methods in object
An operator and keyword
Submit
28.
A class cannot be declared
Static
Private
Submit
29.
If class A implements an interface does it need to implement all methods of that interface?
Yes, always
No, not when A is abstract
Submit
30.
What is the size of a Char?
4 bits
7 bits
8 bits
16 bits
Submit
31.
Can you compare a boolean to an integer?
Yes
No
Submit
32.
Which is NOT a section of all types of loops ?
Test statement
The word "while"
Submit
33.
Following code will result in: int a1 = 5; double a2 = (float)a1;
Runtime error
No errors
Submit
34.
Following code will result in: class A { public static void main(String [] args) {A a = new B(); }} class B extends A {}
Runtime Exception
No errors
Submit
35.
Why can't the whole program just consist of the one line that does the painting ?
In Java, to create an applet, you can't call on functions without defining a class to call them.
The drawString function is not defined without the "import" statements at the top.
All of the above.
Submit
36.
Java keywords are written in lowercase as well as uppercase
True
False
Submit
37.
A class can be transient
True
False
Submit
38.
What will be the value of "num" after the following statements?
1
12
Submit
39.
The following statements make "length" be what number ?
5
6
Submit
40.
Integer a = new Integer(2); Integer b = new Integer(2); What happens when you do if (a==b)?
True
FALSE
Submit
41.
Following code will result in: class A { public static void main(String [] args) {A a = new B(); }} class B extends A {}
Compile error
No error
Submit
42.
The default statement of a switch is always executed
True
False
Submit
View My Results
Related Quizzes
Java Ch 9 Quiz
Java Ch 9 Quiz
20130423-invent Java Quiz #
20130423-invent Java Quiz #
Java Descriptive Test Quiz
Java Descriptive Test Quiz
Thank you for your feedback!
Would you like to edit this question to improve it?
No thanks
Name:
Email:
Oops! Give us more information:
Incorrect Question
Incorrect Answer
Typos
I have a feedback
Submit
Please provide name and email to proceed.
Please provide correct email to proceed.
Please provide feedback.
Please select the option.
All (42)
Unanswered (
)
Answered (
)
What is Java (in regard to Computer Science) ?
WHAT IS AN APPLET?
What is a function in terms of Computer Science ?
Java runs on _______.
If you want your conditional to depend on two conditions BOTH...
What is a loop ?
What does AWT stands for ?
Booleans are _______.
Following code will result in: int a = 3.5;
Synchronized is a keyword to tell a Thread to grab an Object lock...
What is the main function of any variable ?
What is an assignment statement ?
An abstract class can have non-abstract methods
Primitive datatypes are allocated on a stack
Methods that are marked protected can be called in any subclass of...
What is the proper way to declare a variable ?
What's the difference between an Applet and an application ?
Inner classes can be defined within methods
What is essential in making sure that your loop is not infinite ?
The methods wait(), notify() and notifyAll() in Object need to be...
Following code will result in: float a = 9/0
How can you prevent a member variable from becoming serialized?
Which of the following means that in order for the conditional to...
Following code will result in: int a = 9/0;
Following code will result in: class A { int b = 1; public static void...
In a 'for' loop, what section of the loop is not included in the...
What is an instanceof
A class cannot be declared
If class A implements an interface does it need to implement all...
What is the size of a Char?
Can you compare a boolean to an integer?
Which is NOT a section of all types of loops ?
Following code will result in: int a1 = 5; double a2 = (float)a1;
Following code will result in: class A { public static void...
Why can't the whole program just consist of the one line that does...
Java keywords are written in lowercase as well as uppercase
A class can be transient
What will be the value of "num" after the following statements?
The following statements make "length" be what number ?
Integer a = new Integer(2); Integer b = new Integer(2); What happens...
Following code will result in: class A { public static void...
The default statement of a switch is always executed
X
OK
X
OK
Cancel
X
OK
Cancel
Back to top
Back to top
Advertisement