Posts

Showing posts with the label basic information java

How to print Hello World! in JAVA language

How to print Hello World! : Let's start by creating a simple program that prints “Hello World” to the screen. class MyClass {     public static void main(String[ ] args) {         System.out.println("Hello World");     } } In Java, every line of code that can actually run needs to be inside a class. In our example, we named the class MyClass. You will learn more about classes in the upcoming modules. In Java, each application has an entry point, or a starting point, which is a method called main. Along with main, the keywords public and static will also be explained later. The main Method To run our program, the main method must be identical to this signature: public static void main(String[ ] args) -> public: anyone can access it -> static: method can be run without creating an instance of the class containing the main method -> void: method doesn't return any value -> main: the name of the method For examp...

Introduction of the Java Programming Language

Welcome to Java! Java is a high level, modern programming language designed in the early 1990s by Sun Microsystems, and currently owned by Oracle. Java is Platform Independent, which means that you only need to write the program once to be able to run it on a number of different platforms! Java is portable, robust, and dynamic, with the ability to fit the needs of virtually any type of application. More than 3 billion devices run Java. Java is used to develop apps for Google's Android OS, various Desktop Applications, such as media players, antivirus programs, Web Applications, Enterprise Applications (i.e. banking), and many more!