Wednesday, 15 July 2015

JAVA INTRODUCTION USING ECLIPSE


To configure the selenium web driver we have to do the following
Download & Install java (updated).
Download selenium web driver (updated) from selenium website
Get eclipse IDE for java EE developers 32 bit from internet we will get zip file then unzip it.
Open eclipse folder we find the application then double click on it.
Starting with eclipse:
Navigation for creating a project:
Right click in the project explorer
Go to new select the option project
Select java project in the list then click on next
Specify the desired project name
Click on finish.
 Navigation for creating a package:
Right click on src folder, go to new, and select the option package
Specify the desired package name click on finish.
 Navigation for creating a java file (class file):
Right click on package, go to new
Select the option class
Specify the desired class name
Select the check box
   Public static void main
Click on finish.
System.out.println () stmt: this stmt is used for printing something in the console.
Syntax: System.out.println (“string”);
Note: syso…………..ctrl+space
1) if we write syso andpress ctrl+space then the following statement will generate
    System.out.println(“akhil is a good boy”)
2) Without creating package also we can create class, and then it will take default package.
Then click on run
Now the output is shown in console part
  Akhil is a good boy
Note:
If u want comment multiple lines then syntax:
/* and */ click on enter
If you want comment single line then syntax:
//

No comments:

Post a Comment