Java is a programming language which helps us in writing commands(code) to make a computer do a particular task. Java is one of the many programming languages we use to instruct the computer. Other programming language include C, C++, Python and many more.We all know that computer is a dumb machine. It needs to be instructed how to perform any particular task and we use a programming language to achieve this.Java is one of such language the computer understands.Java is a mediator between us and our computer.So if you know java programming you will be able to teach your computer to execute tasks.It is used in different sectors. It can be used to instruct robots to carry out a particular task.In this case the robot has an operating system, just like a computer does, which allows it to be given instructions.Java programming is used to create android apps which we all use in daily basis. We all may not know but all androids applications running in the android phone uses java programming. Java is also used to create desktop applications which we use in daily basis.
Basic code syntax for Java Program
public class firstProgram
public static void main(String args)
System.out.println(“First Program of Java”);
Output: First Program of Java.
We can use different Editors for writing java code. Many IDEs are available for java in the market, but for the begginers, we can use simple editors like Notepad, Notepad Plus, Netbeans, Eclipse etc. For writing java programs, we have to be careful while writing the syntax. We have to keep different things in mind while writing program in java. Following points have to be considered while writing a program.
4.Program File Name
5.Public static void main(String args).
Java Identifiers are names used for classes, variables and methods. We have to keep several things in mind for identifiers which are as follows.
1.Identifiers are case sensitive
2.Keyword can not be used as an identifier
3.Identifiers can have any combination of characters after the first character.
4.All identifiers should begin with a letter A to Z or a-z, currency character($) or an underscore(_).
- Legal Identifiers example: name, $age, _value,_1 etc
- Illegal Identifiers: 123abc,-salary, etc.
I have provided you a link to java crash course for you all. Go to this Link.