Core Java Archive
We can pass local variables from one method to another method as parameter. Passing object as parameter: Like primitive data types, we can pass objects as parameters. We need to collect these parameters into Class …
Method returning primitive variable: Called function can return the value. We collect these values in the calling method Method returning address of object: Accessing non static method using static object reference variable:
System.out.println(): System is pre-defined class. System contains a static variable called “out” “out” is the object of PrintStrem class type. “out” represents standard output device (monitor) object. PrintStream class: It is belongs to io package. …
Data types: In the declaration of every variable, it is mandatory to represent its data type. Data type describes The size of memory allocated to variable. The type of data allowed to store into variable. …
Integer types: We have 4 integer types among eight available primitive types in java. We can represent size in bytes of memory. Integer data type values come under positive and negative. Data types allow you …
Character data type: Character type can store characters, symbols and digits. Character represents using ‘single quotes’. Character System: Program is a set of instructions. Instruction consists alphabets, digits and symbols. System converts every instruction into …
Type casting: Conversion of data from one data type to another data type. Casting (conversion) happens at runtime. Java allows Primitive casting & Object casting. Casting can be either Implicit (internal) by JVM Explicit (external) …
float type Size in bytes Limits float 4 ±3.40282347E+38F double 8 ±1.79769313486231570E+308 Note: By default the decimal type is double. Hence we cannot assign a value directly to double(higher) type variable. We can declare float …
Operator: An operator is a symbol that performs an operation. An operator acts on some variables called operands to get the desired result. Java operators can be classified into Unary operators: Performs operation on a Single …
Control Statements: Statement is a line of code in java program. Every statement in java contains expressions. Expressions build with operands (variables), operators, values, method calls….. Statements execution can be either Sequential or Control. Sequential …