stud
bud
Sign up
Log in
Home
Library
Explore
SAT
More
Fontys Venlo - Programming Concepts - week 2 Flashcards | StudBud
Explore
/
Fontys Venlo - Programming Concepts - week 2
Fontys Venlo - Programming Concepts - week 2
9 terms
·
StudBud Administration
·
158 plays
#fontys #fhtenl #prc1 #java #week2
Flashcards
9 cards
F
Practice quiz
P
Host live
L
Questions
9
Answers
1
How do you correctly define a main-method in a Java class?
static public main(String[] args) { // some content }
public void static main(String[] args) { // some content }
public static void main(String[] args) { // some content }
static main void(String[] args) { // some content }
2
Which data type is
NOT
a primitive integer type?
long
short
byte
float
3
How can you correctly set up a Scanner for reading input from the console?
Scanner input = new Scanner(System.in);
Scanner input = new Scanner(System);
Scanner input = new Scanner(readConsole);
Scanner input = new Scanner(scan);
4
What is NOT a reserved keyword in Java?
main
static
public
class
5
What is the output of the following code
(see image)
2
10
1
5.5
6
How do you print out correctly text to the console?
System.out.println("Welcome to Java!");
System.out.println(Welcome to Java!);
System.out.println(\"Welcome to Java!\");
System.out.println{"Welcome to Java!"};
7
Which would be the BEST data type choice for the following value:
9.732
int
double
String
Integer
8
How do you compile a program with Java?
compile HelloWorld.java
java HelloWorld.java
javap HelloWorld.java
javac HelloWorld.java
9
What will NOT produce a Syntax Error?
System.out.println("Hello");
System.out.println("Hello")
System.out.println(Hello");
System.out.println(Hello)