Induction Flashcards
1
Q
Values can hold values of types that are…
A
Declared
2
Q
Java has two types of types:
A
Primitive and Classes
3
Q
Why is 13.println() an error?
A
Because int is not an object and you can’t call a method on it
4
Q
Identifiers can only begin with:
A
Letters, dollar sign or underscore
5
Q
Assignment operators
A
= \+ - / * %
6
Q
Comparison operators
A
== equal
!= not equal
>
=
7
Q
Logical operators
A
&& and
|| or
!
These are used to eat true or false for example in for loops
8
Q
Examples of string methods
A
.length
.toUpperCase
.replace(“issipp”, “our”) replaces with our
9
Q
Types are sets with…
A
The same behaviour