-
-
Package is a directory. Java classes can be grouped together in packages. A package name is the same as the directory (folder) name which contains the .java files. You declare packages when you define your Java program, and you name the packages you want to use from other libraries in an import statement.
-
Package declaration : The statement order is as follows. Comments can go anywhere.
1- Package statment (optional). 2- Imports (optional). 3- Class or interface definitions.
-
Imports: three options 1- Classes can be specified implicitly on import instead of using the wildcard character.
2- Classes can be specified explicitly on import instead of using the wildcard character.
3- Alternately we can the fully qualified class name without an import.
-
-
-
looping is a feature which facilitates the execution of a set of instructions until the controlling Boolean-expression evaluates to false.
-
the types of loops that we can find in Java: Simple for loop, Enhanced for-each loop, While loop and Do-While loop
-
For Loop : A for loop is a control structure that allows us to repeat certain operations by incrementing and evaluating a loop counter.
-
The while loop is Java's most fundamental loop statement. It repeats a statement or a block of statements while its controlling Boolean-expression is true.
-
Do-While Loop : The do-while loop works just like the while loop except for the fact that the first condition evaluation happens after the first iteration of the loop.
-






