- Information
- AI Chat
Was this document helpful?
CSC1016S 2021 Theory Test 1
Course: Java programming (CSC1016S)
174 Documents
Students shared 174 documents in this course
University: University of Cape Town
Was this document helpful?
Tests & Quizzes
Theory Test 1, 2021
Part 1 of 9 - Basics
Question 1 of 6 1 Points
The statement System.out.printf("%3.1f", 1234.56) outputs ___ _
Question 2 of 6 1 Points
public class _·est {
public static void n1.ain (String [] args) {
int X = 1;
}
}
int y = x++ + x;
System.out.println(uy is u + y);
What is displayed in the given code?
Question 3 of 6 1 Points
Every statement in Java ends with __ _
•A. a semicolon (;)
•B. a period (.)
•C. a new line .
•D. an asterisk (*)
•E. a comma (,)
Reset Selection