APCSA Week 1 Questions
What is the exception that is thrown to warn programmers about arithmetic errors in their code?
ArithmeticException
Which is the primitive type? String / Char
Char
If a program is contained in public class MyProgram{}, what is the file name of this program?
MyProgram
What is a data type made by programmers that often use primitive types?
Reference Types
Which is the reference type? String / Char
String
What is the correct way on the same line in Java?
System.out.print
What is the correct way of printing on a new line in Java?
System.out.println("string")
Determine data type: false
boolean
What are primitive types to programming languages?
building blocks
Variable names are "____ sen____ve"
case sensitive
alter the declaration so that it's value cannot be altered: int numApples = 5;
final int numApples = 5;
Determine data type: 5
int
Write the word "numapplesinbasket" in lower camel case.
numApplesInBasket
What is the correct syntax for writing the main method in Java?
public static void main(String[] args){}
The order of operations starts with "p____th_s_s, ___one_ts, m___ipli_______ and ________, ___ition and ______ction."
starts with parentheses, exponents, multiplications and division, addition and subtraction.