Posts

What is Variable in JAVA ?

  What is Variable in JAVA ? It is a name of storage space which is used to store data. It's value may be changed. It always contains last value stored to it. It is always declared with data type.      Variables  store data for processing. A variable is given a name (or  identifier ), such as area, age, height, and the like. The name uniquely identifies each variable, assigning a value to the variable and retrieving the value stored. Variables have  types . Some examples: -  int : for integers (whole numbers) such as 123 and -456 -  double : for floating-point or real numbers with optional decimal points and fractional parts in fixed or scientific notations, such as 3.1416, -55.66. -  String : for texts such as "Hello" or "Good Morning!". Text strings are enclosed within double quotes. You can declare a variable of a type and assign it a value. Example: String name = "David"; JAVA This creates a variable called  name  of type...

Setting up the environment in Java

  Environment Setup in Java ? There are two step to setup the environment in Java Window 7 Step 1: Copy the JDK Path Go to  C Drive click on  Program Files(x86)/Program Files click on  java click on  jdk click on  bin Now copy the url,It looks like this C:\Program Files (x86)\Java\jdk1.8.0_45\bin Step 2: Setup the environment varible 1.From desktop, right click on Computer icon. 2.Choose Properties 3.Click the  Advanced system settings 4.Click Environment Variables 5.In the section System Variables, find the PATH environment variable and select it. Click Edit. If the PATH environment variable does not exist, click New. 6.Now in next window there are two section  Varibale Name  and  Varibale Value  now in  Varibale Name  put  PATH  and in  Varibale Value  paste the copied URL in the  Step 1  and add semicolon in the last then click ok. Now open command prompt window and run java code. Window 10...

Java Basic Syntax

  Syntax of Java ? class Easy { public static void main(String[] args) { System.out.println( "Hello World" ); } } class 1.It is a keyword which is used to declare a class. 2. Keyword :The word which is predefined in the library is called keyword.for example class,void ,main etc. Easy 1.It is an userdefined class name. public 1.It is a keyword which is called access specifier/modifier. 2.It is used to provide accessibility of data member(variable) and member funation(function). static 1.It is a keyword. 2.It can be used with a variable or function or block,we will discuss it in next chapter. void 1.It is a keyword. 2.It indicates that there is no value is returning by the function. 3.If we use any other keyword like int,float,char etc in place of void then we will use  return  keyword. main() 1.It is the function which is called the entry point of any program. 2.The execution of any prgram starts from the main function. 3.If in a program there is only one f...

Introduction to Java

  What is Java ? It is general-purpose, high level,object oriented programming language. It is developed by  James Gosling . It is developed at  Sun Microsystems  in 1995 History of Java ? James Gosling and his team started to work on java for a client's set top box project in 1991. The first version of java  (java 1.0)  is released in 1995. First name of java is  Oak  next goes to  Green  and finally becomes  JAVA . Java is the name of  Coffee Seed . Features of Java ? Platform Independent :Java is called platform independent because a java program can be run on different kind of platform for example  Window os,Linux os  etc. Object Oriented :Java supports object oriented programming structure so it is called object oriented. Security :Java is more secure language as compare to other programming language. Flexible :An application developed in java can be modified as per user requirement so it is called flexible progr...

Your First Java Program

What is Java?

  What is 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! Notes  Learn, practice, and then join the huge community of Java developers around the world class  Simple{        public   static   void  main(String args[]){        System.out.print...