Fundamentals Flashcards
What is a function?
A function is a block of code that performs a task.
What is the function main?
It is the entry point of our program.
What is a class?
Using a basic perspective, it is a container for one or more related functions, but using a more advance logic it is a blueprint that enable us to create objects.
What does classes are useful for?
They help us organize our code.
What is a method?
It is a function that is part of a class.
What is an access modifier?
It is a special keyword that determines if other classes and methods of the program can access these classes and methods.
Give me some examples of access modifiers.
Private and public.
What does PascalNamingConvention means?
It means that the first letter of every word should be uppercase.
What does camelNamingConvention means?
It means that the first letter of every word should be uppercase except the first word.
What type of naming convention we use for classes?
PascalNamingConvention
What type of naming convention we use for methods?
camelNamingConvention
What is a package used for?
It is used to group related classes.
What do we use to comment our code?
Two slashes //
What type of quotes should we use with textual data?
We should use double quotes.
What is a String?
A sequence of characters.
What are variables used for?
They are used to temporarily store data on the computer’s memory.
What is an identifier?
Is the name or label we give to our variables.
What other name we give to the equal sign?
Assignment operator.
What do we mean to initialize a variable?
To give the variable an initial value.
How many types we have in Java?
Two types: primitive types and non-primitive types also called reference types.
What do we store in primitive types?
Simple values.
What do we store in reference types?
Complex objects.
How many primitive types we have?
We have eight: byte, short, int, long, float, double, char, boolean.
Which primitives store whole numbers?
Byte, short, int and long.