Firstly, it is important to mention a list of keywords to learn in Java. The most basic one is how to declare a class. A class is defined as a template (user defined blueprint) where objects can be created or changed. When declaring a class, it would be declared as

public class ClassName{

} (IT IS VERY IMPORTANT TO HAVE BRACKETS TO INDICATE AND OPENING AND CLOSING OF BRACKETS! ALL THE CODE IS WRITTEN WITHIN THE BRACKETS OF THE CLASS!

Another crucial part of writing a Java class is writing a method. What is a method? A method is a set of code referred to by a name and can be simply invoked/utilized by using the method’s name.

E.X. public (return type) (Method Name) {

}(THE RETURN TYPE OF A METHOD IS WHAT VALUE THE METHOD WILL RETURN. IT CAN BE A STRING, INTEGER, BOOLEAN(TRUE OR FALSE),FLOAT, ETC…)

Coming to the return types, there is a certain list of primitive types in Java: BYTE,SHORT,INT,LONG,BOOLEAN,STRING,DOUBLE,CHAR

SHORT: A small version of an integer number; INT: an integer number with many digits; LONG: An integer with many numbers; STRING: A word or group of words separated by spaces (Single characters combined together.); CHAR: A single letter or special character.

VIDEO ABOUT ALL PRIMITIVE TYPES:

The next important keyword (phrase) to learn is the print statement. This leads to the very first thing that is called HelloWorld(classname). The syntax is System.out.println(); (IF ANYTHING IS IN WORDS, YOU MUST SURROUND THE WORD/WORDS WITH A COLON IN THE BEGINNING AND END!)

Remember, a keyword in Java is very important because it is required before the declaration of a variable

LINK FOR ALL JAVA IMPORTANT KEYWORDS: https://www.geeksforgeeks.org/list-of-all-java-keywords/

LINK FOR EXAMPLES USING ALL JAVA KEYWORDS: https://javaconceptoftheday.com/java-keywords-with-examples/


Copyright © 2020 — Mins WordPress theme by GoDaddy