In flowcharting, this symbol represents a process or an instruction.
What is a rectangle?
This is an instance of a class
What is an object?
This JButton method is used to define the text that appears on the button's surface.
What is setText()?
This ternary operator is a shorthand way to perform an if-else statement
What is ?: ?
Determine the output
System.out.println(8 + 4 / 2);
This is the term for a step-by-step sequence of instructions to solve a problem.
What is an algorithm?
This OOP principle wraps data into a single unit
What is encapsulation?
Which Swing component can display text, an image, or both — but cannot be directly edited by the user?
What is a JLabel?
The logical operator that uses short-circuit evaluation meaning the second operand is skipped if the first is false.
What is && (Logical AND)?
Determine the output
int a = 5;
System.out.println(a++ + ++a);
What is 12?
Which of the following data types stores a single character?
What is a char?
This OOP concept allows one class to inherit properties of another
What is inheritance?
This interface uses a class implement to handle user actions like button clicks in Swing applications?
What is ActionListener?
When the expression 10 % 3 is evaluated in Java, what is the integer value returned?
Fill in the blank
JFrame frame = new JFrame("My Window");
frame.________(true);
setVisible
In Java, This is the entry point method where execution begins
What is public static void main(String[] args)?
This is when a subclass redefines a method from its parent class
This method is used to make a JFrame visible after adding all its components.
What is setVisible(true)?
This is the immediate result of the expression when the first operand of the Logical OR (||) operator evaluates to true?
What is True?
Fill in the blank
JButton btn = new JButton("Click Me");
frame.________(btn);
What is add?
Who is James Gosling?
This OOP principle hides how things work and only shows what they do.
What is Abstraction?
This Java package is the old library that Swing was built upon
java.awt
In boolean logic, this operator negates a single condition and is used to reverse the logical state of an operand.
What is ! (logical NOT) ?
Fill in the blank
frame.setDefaultCloseOperation(______.EXIT_ON_CLOSE);
What is JFrame