The only required elements of a method declaration are the method’s return type, name, a pair of parentheses, () , and a body between braces, {} . More generally, method declarations have six components, in order: Modifiers—such as public , private , and others you will learn about later.
Read moreWhat is declaration in Java?
Java declaration statements are one kind of statement, where declare a variable with specifying it’s data type and name . A variable is named container (identifier) that holds values used in a Java program.
Read more