Introduction to java. Important things to know about java.

Most of the times when first starting out to code in java the first thing that they will do is search for this phrase introduction to java and this is what i will answer in this article.

So here we will discuss about what is java and some basic things that a beginner should know in order to program in java.

So lets get started!

What is Java?

Java is a popular programming language first released back in 1995. It was released by a company called sun micro-systems. The main thing about java is it is old language and some websites and applications might not work properly if java is not there. Java is fast, secure and reliable. From laptops to data-centers and small company computers to scientific super computers, java is everywhere.

Now you might have clear understanding of what java really is? Know let’s discuss it’s core building blocks and patterns on which it is based and all these things are required for someone who have just started java.

Important things to keep in mind while programming in java: ( introduction to java )

Here are the few important things to keep in mind while starting coding in java.

Case Sensitivity:

Java programming language is case sensitive and it will handle things differently.

For example in java, Hello and hello are treated differently. Due to case sensitive factor in naming conventions in java it become very important for you to know this as this will help you in declaring and using variables and so many other things.

Class Names:

In java the name of the class starts with the capital letter. If you have multiple words in a single class name then all the letters of different words starts with Capital letter.

For example class MyFirstJavaClass, so in this declaration of class in java the first letter of all the words are capital and you should follow this.

Method Names:

All method names should start with a lower case letter and if there is several words in a single method name then all the other words should start with the capital letter.

For Example, public void MyFirstJavaMethod.

Name of the Program File:

The name of the program file should be exactly the same as the main class name.

Identifiers:

Identifiers are the name of variables, method, class, packages and interfaces. They are just for reference with other things.

Each variable has a name by which it is identified inside the class.

A variable name should start with letter, underscore (_) or a dollar sign ($).

// My First Program

class HelloWorldProgram{
    public static void main(String[] args) {
        System.out.println("Hello, World!"); 
    }
}

In this program HelloWorldProgram, println and Strings[] args are identifiers.

Reserved Keywords in Java:

abstractdoifprivate
assertdoubleimplementsprotected
booleanelseimportpublic
breakenuminstanceofreturn
byteextendsintshort
casefalseinterfacestatic
catchfinallongstrictfp
charfinallynativesuper
classfloatnewswitch
constfornullsynchronized
java reserved keywords list.
defaultgotopackage
thisthrowthrows
transienttrue
tryvoidvolatile
whilecontinue

These above keywords are the reserved keywords in java and you cannot assign these keywords to variables and thing like that.

There are plenty of other things that you should know as a java programmer and you’ll learn those as you proceed.

Leave a Reply

Your email address will not be published. Required fields are marked *