Chapter 3 Flashcards
Does name of file must match name of class
Yes
Is java case sensitive
Yes
What is the purpose of static
So we can call a method without creating an object
What is concatenate operator in java
+
How we compare strings in java
string1.equals(string2)
Is array a class in java
Yes
What happens if we give value more than array size
Java sends exception
What are primitives
The data types in java which are not objects. They are always in lower case.
How much primitive data types in java
8
What is stored at stack
Local variables, primitive data types
What is stored at heap
Objects
How primitive data types passes
By value
How object passes
By reference
What are wrapper classes
Through wrapper classes, we pass data types as reference (just like objects)
What parseXxx do
It changes the datatype. e.g.
String value = “532”;
int d = Integer.parseInt(value);