My experiment
Friday, January 15, 2021
Data Types in Java
Wednesday, January 13, 2021
Variables in Java
Variables in Java
Java variables type:
Local variable:
Instance variable:
Static variable:
Sample program:
![]() |
Arrow mark show error when no object create for instance variables |
Tuesday, January 12, 2021
Java Identifier
Java Identifier
Rules for Java Identifier:
Valid Identifiers:
Invalid Identifiers:
Program for identifiers.
Let's discuss our program and find identifiers:-
simple java program to print hello world
simple java program to print hello world.
![]() |
3 and 4 show step 3 and 4 respectively |
Sunday, January 10, 2021
Why java is platform independent language?
Why java is platform independent language?
Java is portable programming language and that java programs can run on any operating system. Java is a high level programing language that allows a developer to write programs that are independent of a particular type of computer. High level programming language are easier to read ,write ,and maintain it. But their code must be translated by compiler into machine language. Machine language is referred as machine code or object code. Machine language is collection of binary bits that a computer read and interprets it. This machine code is not human readable code. This machine code change by compiler of different operating system.
Therefore if we write a program(file name.c) in c language that is human readable format and machine can not understand this source code. For this situation this code must be converted into machine code. Then we convert this source code into machine code or machine language with the help of compiler. Compiler convert this code into machine code that is executable(file name.exe) .
1. First image show source code.
2. Second Image show after compile source code create a executable code or machine code or object code.
source code of c program |
![]() |
arrow mark show machine code(object code) |
![]() |
arrow mark show the bytecode |
Data Types in Java
Data Types in Java Data Type in Java is defined as that specifies the size of memory allocated for a specific variable and which type of va...

-
Java Identifier These are the names the programmers choose. These names can be assigned to variables, methods, functions, classes, etc., t...
-
simple java program to print hello world. class Sample { public static void main(String []args) { System.out.println("Hello Worl...
-
Why java is platform independent language? Java is portable programming language and that java programs can run on any operating system. Jav...