What do you call this?
public class Main {
class header
How many variables are there?
5
Math.max does what?
Takes the maximum of two numbers
&& is for?
and
Int age = 15;
int age = 15;
What is this?
System.out.println();
Print statement
Which variable is used for words?
String
Math.abs(-87) will be?
87
OR is coded using?
||
String myName = "Sabrina;
String myName = "Sabrina";
Difference between print() and println()
print() prints on the same line while println() prints on a new line
Int is for decimals. True or False.
False.
double sqrt = Math.sqrt(4) is equal to?
2
++8 is?
9
system.out.Println("hi");
System.out.println("hi");
/* */ is used for?
char uses what type of quotations? Single or Double
Single
Math.random Provides a random number between?
(your answer should include "inclusive" & "exclusive")
0 (inclusive) to 1.0 (exclusive)
10%3 is?
char myLet = h;
char myLet = 'h';
What is the code for the main method?
public static void main(String[] args)
Give an example of a float variable. Provide variable type, variable name, and variable value.
float num1 = 50.0f;
If I want to raise 7 to the power of 2, how would I do it using Math functions?
Math.pow(7,2);
What will print if:
x=6;
boolean checkAns = !(x>3 || x<5);
System.out.print(checkAns);
False
Public class Subject{
public class Subject {