Professional Documents
Culture Documents
Quiz Sectiunea 4
Quiz Sectiunea 4
1. When Eclipse launches, the Welcome page displays. Once this page is closed you cannot return
to the resources available on this page. True or False? True False (*)
2. Eclipse provides an edit area to help you navigate a hierarchy of information. True or False?
True False (*)
3. Eclipse provides views to help you navigate a hierarchy of information. True or False?
True (*) False
4. Tabs are used when more than one file is open in the edit area. True or False?
True (*) False
6. The ______________ is the location onto which you will store and save your files.
o Perspective
o Workspace (*)
o Editor
o None of the above
7. A workspace can have one or more stored projects. True or false? True (*) False
A-Main Method, B-Class, C-Package
A-Class, B-MainMethod, C-Package
A-Package, B-Main Method, C-Class (*)
None of the above
9. In Eclipse, when you run a Java Application, the results may be displayed in the Console View.
True or False? True (*) False
Quiz 2 Sectiunea 4
2. When importing another package into a class you must import the entire package as well as the
package classes that will be called. True or False? True False (*)
4. A counter used in a For loop cannot be initialized within the For loop statement. True or False?
True False (*)
Sectiunea 4 1
1.Which of the two diagrams below illustrate the
general form of a Java program?
Example A
Example B (*)
3. Which of the two diagrams below illustrate the correct syntax for variables used in an if-else
statement? Example A (*) Example B
5. The syntax below represents a valid initialization of a For loop counter. True or False?
public class ForLoop {
public static void main (String args[])
{
for (int i=10; i <20; i++)<
{System.out.println("i: "+i); }
}
} True (*) False
7.In a For loop, the counter is automatically incremented after each loop iteration. True or False?
True False (*)
8. In an if-else construct, the condition to be evaluated must be contained within parentheses. True
or False? True (*) False
Quiz 3 Sectiunea 4
1. The six relational operators in Java are:
>,<,=,!,<=,>=
>,<,=,!=,=<,=>
>,<,=,!=,<=,>=
>,<,==,!=,<=,>= (*)
Sectiunea 4 2
!=,=,==
&&, ||, ! (*)
&&,!=,=
&,|,=
0 3 (*) 4 5
11. Which of the following is the name of a Java primitive data type?
String
int (*)
Rectangle
Object
Sectiunea 4 3
dgo2sleep
4geeks (*)
to_be_or_not_to_be
14. Which of the following statements correctly assigns "3 times 10 to the 4th power" to the
variable number?
double number=3*10^4;
double number=3(e4);
double number=3e4; (*)
double number=3*10e4;
15. Which line of code does not assign 3.5 to the variable x?
double x=3.5
x=3.5;
3.5=x; (*)
x=7.0/2.0;
18.Which line of Java code properly calculates the volume of a cone using
where r and h are Java primitive integers?
double V=1/3*3.14*r*r*h;
double V=(double)1/3*Math.PI*Math.pow(r,2)*h; (*)
double V=1/3*Math.PI*Math.pow(r,2)*h;
double V=(double)1/3*Math.PI*Math.pow(2,r)*h;
double V=1/3*3.14*r(2)*h;