JDK (Java Development Kit) – allows developers to create Java programs that can
be executed by the Java Runtime Environment (JRE).
Packages – serves as a folder in a directory where we can throw all our related
codes in the same directory.
Variables – are used to store up temporary data to be used in our programs
runtime.
Data Type – are the type of Data inside our Variable.
Sa float dapat may f sa dulo
para gumana: sample = 95.5f
Identifiers – is the name of the variable that the programmer indicated, it is
used to Read and Write to the variable.
Rules of Identifiers:
You cannot use any special characters other than underscore
You cannot use whitespaces
You cannot use numbers alone
You can use numbers but with a Letter
Declaring Variables:
Datatype identifier;
Datatype identifier = value;
Built – In packages – Java API has many pre-written classes to help the
programmers manage the inputs, database and etc.
Importing Packages:
Import Specific Class – import packagename.classname;
Import Whole Package – import packagename.*;
java.util.Scanner – is a class in java.util package that helps the programmers
handles inputs from the user.
Instantiation
CHALLENGE:
Arrays – Is a collection of Multiple Values in a Single Variable with the Same
Datatype, they are governed by using an index.
Elements – Are the individual values in an Array.
Index – is a number that represents a position in a collection.
CHALLENGE:
Conditional Statements – it compares two values so that our program can decide
what action should be taken.
IF Statement – Handles 1 Conditional Expression, it either does something or
nothing.
IF – ELSE Statement – Handles 2 Conditional Expressions, it either does the
first code block or the second code block.
IF – ELSE IF – ELSE Statement – Handles 3 or More Conditional Expressions. The
Possibility of this statements are limitless, it will run a certain code block
based on the condition.
NESTED Conditional Statement – A Conditional Statement within a Conditional
Statement.
Equals Function – To compare strings more efficiently we need to make use of
the Equals Function because the Equal relational operators compares the memory
address not the content.
Switch Statements – is similar to a Conditional Statements but only checks for
equality and only works with String, char, int and enums.
Case Keyword – used to define a “case” in a switch statement.
Default Keyword – often used to handle values that are NOT on the case. It is
recommended that this keyword is used on the END of the switch statement.
(SERVES AS ELSE statement)
Break Keyword – it is used to BREAK OUT of a Switch Statement or loop
statements without executing the whole block of code inside it.