Boxing: Converting primitive byte to object Byte. All byte data conversion methods belong to Byte class only. In Byte class, there is a method that can converts primitive byte into Object Byte. Library is a …
Primitive types: Java supports 8 primitive data types. Java is not Fully Object oriented programming language Any language that supports primitive types is not Fully Object oriented. Examples of Fully OOPLs: Python, Small talk, Ruby….. …
Sub package: Define a package inside other package. A package can have one or more sub packages. Creating sub package is as simple as package creation. Compiler creates all the required packages to generate class …
Fully Qualified Name: It is used to access a class by specifying complete path. We can replace ‘import’ with fully qualified name. To work with any class in java application, either we use ‘import’ statement …
Connecting same package classes: Package is a collection of classes. We can connect the classes by accessing one class members from another class. Default access permissions are package level in java. Hence we can connect …
Custom packages: Java library is a collection of packages. A programmer can create custom package depends on application requirement. ‘package’ keyword is used to create the package. ‘package’ statement must be the first statement in …
Random class: It is belongs to util package. It is used to work with System generated random integer values nextInt(): Non static method belongs to Random class. Random values will be generated in integer limits. …
Scanner: Scanner class is used to read input from the user. Scanner class can read the data from different input sources like KEYBOARD, FILE ….. Look at the constructors of Scanner class – No default …
Accessing the classes from other packages: We need to import other packages to access their classes. Connecting Different Package Classes: ‘import’ statement is used to connect the classes of different packages. We can access only …
Package: Package is a java-folder or directory. Package is a set of related classes, abstract classes and interfaces. In general, folders are created to maintain the related information separately and to access them effectively at …