What is the exact signature of the main method in a Java application?
Select an option, then click Submit answer.
- ○ public static void main(String[] args)
- ○ public void main()
- ○ static main(String args) void
- ○ public static int main()
Loading demo links...
Showing 1–10 of 10 questions
What is the exact signature of the main method in a Java application?
Select an option, then click Submit answer.
Command-line arguments passed to a Java program are received through which parameter?
Select an option, then click Submit answer.
Which TWO are basic input and output practices in Java? (Choose two.)
Select all that apply, then click Submit answer.
A variable declared inside a method can be used where?
Select an option, then click Submit answer.
A variable declared at class level (outside any method) has what scope?
Select an option, then click Submit answer.
Javadoc comments are used to do what?
Select an option, then click Submit answer.
To use a non-static method of your own class from main, you must first do what?
Select an option, then click Submit answer.
Which statement correctly prints a line of text to the console?
Select an option, then click Submit answer.
Scanner reads user input from which source by default in these objectives?
Select an option, then click Submit answer.
Which TWO describe the role of main in a Java application? (Choose two.)
Select all that apply, then click Submit answer.
This page holds a free practice test for the Information Technology Specialist Java certification from Certiport. You will find 10 free questions, drawn from the full Study4Pass practice set of 80 questions for this exam. The questions follow the official Certiport objective domains: Java Fundamentals; Data Types, Variables, and Expressions; Flow Control Implementation; Object-Oriented Programming; Code Compilation and Debugging.
Pick an answer for each question and check it straight away — the correct answer and a full explanation appear under the question. There is no time limit and nothing to sign up for. When an explanation is not enough, use Ask AI: this is an AI-Enabled practice test, and Ask AI explains the concept behind the question in plain language. Ready for more? The full 80-question set adds a timed Exam Simulation mode, topic training for your weak areas, and a flagged-question review.
Covers describing the use of main in a Java application (its signature, consuming an instance of your own class, command-line arguments), performing basic input and output using standard packages (print statements, Scanner), evaluating the scope of a variable, and commenting and documenting programs with Javadocs.
public static void main(String[] args); Command-line arguments; System.out print statements; Scanner input; Block, method and class scope; //, /* */ and /** */ comments; Javadocs
Covers declaring and using primitive data type variables (including when precision is lost and wrapper types), manipulating strings, creating, iterating, and manipulating arrays and array lists (including the Collection Framework), parsing, casting, and conversion, and constructing arithmetic expressions with operator precedence.
byte, char, int, double, short, long, float, boolean; Integer and Boolean wrappers; String class, immutability, comparisons, concatenation, format; One- and two-dimensional arrays; ArrayList, Vector, Stack, LinkedList, HashSet; Casting and parseInt-style parsing; Compound assignment; Operator precedence
Covers constructing and evaluating code that uses branching statements (if, else, else if, switch; single-line vs block; nesting; logical and relational operators) and code that uses loops (while, for, for each, do while; break and continue; nesting; unary operators).
if, else, else if and switch; Single-line vs block form; Nested branches; while, for, for each, do while; break and continue; Logical, relational and unary operators
Covers constructing and evaluating class definitions (constructors, overloading, this, inheritance, overriding), declaring, implementing, and accessing data members (access modifiers, static members, encapsulation), declaring and accessing methods, and instantiating and using class objects.
Constructors and constructor overloading; One class per .java file; this keyword; private, public, protected; Instance vs static members; static final constants; Encapsulation; Method parameters, return types and overloading; Instantiation, null, imports
Covers troubleshooting syntax errors, logic errors, and runtime errors (print statements, javac command output, console exceptions, stack trace evaluation, using generative AI to find errors) and implementing exception handling with try, catch, and finally and the Exception class types.
javac compilation; Syntax vs logic vs runtime errors; Print-statement debugging; Stack traces; try, catch, finally; Exception class and types; Displaying exception information
Yes — the 10 questions on this page are completely free, with no signup and no payment details needed.
80 questions. The 10 free questions above are a sample of that full set, in the same style and topic balance.
Yes — every question shows the correct answer with an explanation, and Ask AI can explain the concept behind a question in plain words if you want to go deeper.