Quizzes Flashcards
public stativ void main(String[] args)
The word static in the method header above means that this method is accessible and usable, even though no ___________ of the class exists
object
__________ error happens when you misspelled the command word javac when compiling the program.
syntax
Java was developed by ___________ to be architecturally neutral, which means it can be run on a wide variety of computer platforms.
Sun Microsystems
The _______ translates language statements into machine code
compiler
A logic error is also called a _________ error, in which the program runs but produces an incorrect result due to a wrong procedure
semantic error
javac FirstJavaProgram.java
When this command line is run, it will _________.
create a new file with the same filename but will a .class extension
compile a class named FirstJavaProgram into a bytecode
generates no messages if there is no syntax error
public class FirstJavaProgram
This command line is the ____________
Class header
In Java, lines comments start with two ____________.
forward slashes
In Java, block comments start with __________
a forward slash and an asterisk
The parameter _______ means that the method does not return a value.
void
Java source code is always written in __________
high-level language
Declaring a method ________ will allow methods in other classes to access or call it
public
Apart from line and block comments, Java also supports another type of comment called _________ for generating documentation.
javadocs
public class FirstJavaProgram
{
public static void main()
{
}
}
The way the text above is written in Java programming is called:
Allman Style
Which of the following is the correct way of assigning a value to a variable?
int studentPopulation = 44;
char myGender = F;
int studentPopulation