Code Structure & Syntax QuizS2C Home « Code Structure & Syntax Quiz
Fundamentals Quiz 1
The quiz below tests your knowledge of the material learnt in Fundamentals - Lesson 2 - Code Structure & Syntax.
Question 1 : Which of the following goes inside a class definition?
- Methods go inside a class definition.
Question 2 : We use the
javacommand to compile programs in Java?
- We use the
javaccommand to compile programs.
Question 3 : What does the
voidkeyword specifies that nothing is returned from the method.
Question 4 : How do we run a file called
Hello.classthat contains a
- We run a file called
Question 5 : Who has access to a
publicclass can be accessed by anyone.
Question 6 : How do we compile a file called
- We compile a file called
Question 8 : A source file should be named after its class?
- A source file should be named after it's class. In fact if the class is public and you name the source file differently and try to compile it you get an error.
Quiz Progress Bar Please select an answer
char data types
Primitives - Numeric data types
Relational & Logical Operators
Bitwise Logical Operators
Bitwise Shift Operators
The next quiz is all about the variables we use in Java.