• Java is a popular programming language.

  • Java is used to develop mobile apps, web apps, desktop apps, games and much more.

  • Java was developed in 1995. by ( James Gosling, Mike Sheridan, and Patrick Naughton at Sun Microsystems.)

  • How does Java work?

    Untitled

    • Compilation:

      • the source code (the code that we write) is stored as a .java file and is sent to the compiler which is stored in JDK(Java Development Kit) and is converted into Byte code (stored as a .class file)
    • Execution:

      • now, JVM(Java Virtual Machine) takes the byte code and makes it a native code
      • and this native code can run on any OS as long as it has JRE(Java Runtime Environment). which comes in JDK.
        • hence JAVA is a portable coding language as it can stored and shared on different OS.
    • command line bhosda

      public class ClassName{
      	public static void main(String[] args){ #can be anything, its just a variable
      		int n = Intger.parseInterger(args[0]);
      		sout(n);
      }
      
      $ javac ClassName.java # compiling the file
      $ java ClassName args[0] args[1] "arg [2]"