Java Tutorial for Beginners - YT Flashcards
What is a function?
A block of code that performs a task
What is a class?
It is a container with one more related functions. It used to organize our code.
What is a method?
A method is a function that is part of a class
What naming convention do you use to name a class?
PascalNamingConvention
What naming convention do you use to name a method?
camelNamingConvention
What happens under the hood the moment we run a Java program in IntelliJ?
There are basically two steps involved. Compilation and Execution.
Compilation step, it uses the Java Compiler to compile our code into a different format called Java bytecode.
What is name of the “age” in this example?
int age = 30;
Identifier because it is used to identify our variable
What is the equal sign called?
int age = 30;
Assignment operator
What is 30 called in this example?
int age = 30;
Initial value
What are primitive types used for?
They are used for storing simple values
What are reference types used for?
They are used for storing complex objects.
Reference types are copied by what?
Their references
Primitive types are copied by their what?
Their value which are completely independent of each other
TRUE OR FALSE:
Strings are not reference types in Java
FALSE
They actually are. They look like primitive types but they aren’t
What is the difference between arguments and parameters?
Parameters are the holes that we define in our methods, arguments are the actual values that we pass to the methods