Theory Flashcards
What is void used for?
“Void” tells the compiler that the main method doesn’t return a value.
What are the “extends” statement used for?
The “extends” statement is used to create a subclass of the superclass. It can be used in as many interfaces as you would like but it can only be implemented once.
What is JOptionPane?
JOptionPane is a dialog box which allows users to enter input.
Importing the JOptionPane Library: javaxswing.JOptionPane;
What are the operators in Java?
The operators include: +; -; *; /; and %.
(esc sequences) ~ Horizontal tab
\t
(esc sequences) ~ backspace
\b
(esc sequences) ~new line
\n
(esc sequences) ~ carriage return
\r
(esc sequences) ~ form feed
\f
(esc sequences) ~ single quote
'
(esc sequences) ~ double quote
"
(esc sequences) ~ backslash
\
What is the size of a int variable?
32 bits
What is the size of a short variable?
16 bits
What is the size of a long variable?
64 bits