1/21
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
|---|
No study sessions yet.
Scanner sc
Scanner sc = new Scanner(System.in);
String text
String text = sc.nextLine():
int number
int number = sc.nextInt();
double number
double number = sc.nextDouble();
Math.max(1,2)
returns max of 2 numbers (equals 2)
Math.squrt(4);
Returns square root (equals 2)
Math.pow(2,4);
returns 2^4 (equals 16)
(Math.random() *(44-22) + 50);
would print out a random number ranging from 50-77
data type
used to initialize variables in Java (e.g. int, boolean, double, string
error
a problem that an application should not try to recover from
debugging
removing errors from computer hardware or software
variable
elements that is used to store data
String
an object that represent a sequence of characters
Scanner
allows the program to store inputs from the user
Declaration
giving your variable a value
else statement
only runs if none of the if statements run
Syntax
the set of rules that define the structure of a Java program
Conditions
if, if else, else,
compile
transforming human code to be more understandable for Java
Casting
TProcess of turning a random number into an integer
boolean
Data type that has the value true or false
Concatenation
process of combining two strings into one big string