Java – Simple Program | who to write java basic programs for beginners.

hello world program in java | www.syedhassan.online

Hi, this is E-SyedHassan and today I am here to write about basic JAVA programs for beginners with the hello world program in java. Furthermore, I will try to come with basic concepts about java to understand that why java programming language is mostly used as a subject in basic computer classes in universities and colleges.

Because java came with the concept of OOPs (Object Oriented Programming) and with the very common syntax of computer programming, therefore, java is mostly studied in university to teach good concepts of programming to students. As compared to Java programming Language C++ and Turbo C++ is very much common in the basic computer conceptual syllabus of students.  

Basic Java Programming Syntax | basic java class concept with the public, static, void, main function

The very basic and main function along with description is mentioned as under. First of all, you have to read the following function line by line written in the coded area of this article then you will be able to understand every keyword of this function.

After that, we will run this code for a good understanding of the implementation of the Java computer programming language

public class hassan{
public static void main (String arg[]){
System.out.println("hello world program in java  syedhassan.online");
}
}

DETAIL OF PRE-DEFINED KEYWORDS OF JAVA COMPUTER PROGRAMMING

main: (It’s just the name of the class. This name is fixed and as it’s called by the JVM).

public: (declares a type of class for example “Public, Private, Protected” ).

class: (pre define namespace for declaring class).

one: (class name u will change it as you desire).

static: ( is a special [optional] keyword that indicates that this method can be called without creating an instance of this class).

void: (is the return type of this method, indicating that this method doesn’t return anything. Methods must have a return type).

(String args[]): (These are the arguments that you are accepting when you run the program).

System: (Is a final class from java.lang package).
out: (Is the reference of PrintStream class and a static member of System class).
println: (Is a method of PrintStream class).

HOW TO RUN JAVA PROGRAM FILES.

Step1: Donwload JDK1.4 (Java Development Kit).

Step2: Save JDK1.4 folder on root of any drive like d:/jdk1.4

Step3: Open Notepad or Notepad ++ write your program.

Step4: Save your file in the D:/jdk1.4/bin folder with java extension for example hassan.java

simple java programs for beginners | www.syedhassan.online

Step5: Goto Startbar write cmd in RUN or find it under programs.

Step6: in CMD access jdk1.4 folder. in my case, I have my JDK folder in E drive so I will access this with the following commands

simple java programs for beginners | www.syedhassan.onlinne

Step7: Now I am in jdk1.4/bin folder. let me access my file I already save in the bin folder and compile it with Java command and run compiled file with the java command.

basic java programs for beginners | www.syedhassan.online

Thinks for Reading, you may also like this one -> DIGITAL MEDIA | AN INTRODUCTION, USAGE, BENEFITS AND FUTURE.

E-SyedHassan

As salam alikom I am Syed Faizan-ul-Hassan from Attock, Punjab, Pakistan. student of Computer Science having good knowledge in Web Based and Desktop Applications Development with PHP, MYSQL & VB DOT NET. This is my e-syedhassan blog to write articles, provide web service. hope you will find best and informative content on this blog.

Leave a Reply