Java

Java is a popular programming language, created in 1995.
It is owned by Oracle, and more than 3 billion devices run Java.
It is used for:

  • Mobile applications (specially Android apps)
  • Desktop applications
  • Web applications
  • Web servers and application servers

Docs
Java
  1. Java works on different platforms (Windows, Mac, Linux, Raspberry Pi, etc.)
  2. It is one of the most popular programming language in the world
  3. It has a large demand in the current job market
  4. It is easy to learn and simple to use
  5. It is open-source and free
  6. It is secure, fast and powerful
  7. It has a huge community support (tens of millions of developers)
  8. Java is an object oriented language which gives a clear structure to programs and allows code to be reused, lowering development costs
  9. As Java is close to C++ and C#, it makes it easy for programmers to switch to Java or vice versa
  1. Java Syntax
    Java Syntax
    The curly braces {} marks the beginning and the end of a block of code.

    System is a built-in Java class that contains useful members, such as out, which is short for "output". The println() method, short for "print line", is used to print a value to the screen (or a file).

    Don't worry too much about System, out and println(). Just know that you need them together to print stuff to the screen.

    You should also note that each code statement must end with a semicolon (;).
                         
                            public class Main {
                                public static void main(String[] args) {
                                  System.out.println("Hello World");
                                }
                              }
                            
    
  2. Convert .java file to .class byte code file
                         
                           javac  Main.java
                            
    
  3. Run .class byte code file
                         
                           java  Main
                            
    
  4. Print Text
    Print Text
    1) The Print() Method
    There is also a print() method, which is similar to println().
    The only difference is that it does not insert a new line at the end of the output


    2) Println()
    You can add as many println() methods as you want. Note that it will add a new line for each method

    Print()

                     
                    System.out.print("I will print on the same line.");
                
            

    Println()

                     
                    System.out.println("Hello World!");