Java Programming in Urdu/Hindi Part 2 of 60 Installation & Path Setting
Text Editor- Notepad++
Jdk- Java developer kit
JRE- Java Runtime Environment
Setting path
google jdk download
download jdk according to your system - 32bit/64bit
It will download automatically at C Drive
Goto C Drive then Program Files then Java folder then Click jdk folder then Click Bin Folder and Copy Path: C:\Program Files\Java\jdk1.8.0_91\bin
At Windows 10 , Network & Settings then System then Advance System Settings then Advance then Environment Variables then System Variable Click New
Give Vaiable Name: Path Variable value: C:\Program Files\Java\jdk1.8.0_91\bin
Java Programming in Urdu/Hindi Part 3 of 60 Hello World
How to write a program
How to Compile Java Program
How to Run a Program
public class Example
{
public static void main(String args[])
{
System.out.println("Hello World");
}
}
Save as your class name like Example.java
Open command prompt
cd desktop
javac Example.java
Write down java Example then get Output
Java Programming in Urdu/Hindi Part 4 of 60 Variables & Data Types
Variable
Data Types
Keyword
public class Example1
{
public static void main(String args[])
{
int a= 5;
double a= 5.6;
System.out.println("Value is -"+a);
}
}
Compile:
command prompt
cd desktop
javac Example1.java
java Example1
Java Programming in Urdu/Hindi Part 5 of 60 Arithmatic Operators
public class Example1
{
public static void main(String args[])
{
int a= 5;
int b= 2;
int c= a+b;
int d= a-b;
int e= a*b;
int f= a/b;
int g= a%b;
int h= a++;
int i= a+-;
System.out.println("Value is -"+c);
System.out.println("Value is -"+d);
System.out.println("Value is -"+e);
System.out.println("Value is -"+f);
System.out.println("Value is -"+g);
System.out.println("Value is -"+h);
System.out.println("Value is -"+i);
}
}
Java Programming in Urdu/Hindi Part 7 of 60 If-else statement
public class Example1
{
public static void main(String args[])
{
int marks= 56;
if (marks>=50){System.out.println("Passed");}
else {System.out.println("Failed");}
}
}
Text Editor- Notepad++
Jdk- Java developer kit
JRE- Java Runtime Environment
Setting path
google jdk download
download jdk according to your system - 32bit/64bit
It will download automatically at C Drive
Goto C Drive then Program Files then Java folder then Click jdk folder then Click Bin Folder and Copy Path: C:\Program Files\Java\jdk1.8.0_91\bin
At Windows 10 , Network & Settings then System then Advance System Settings then Advance then Environment Variables then System Variable Click New
Give Vaiable Name: Path Variable value: C:\Program Files\Java\jdk1.8.0_91\bin
Java Programming in Urdu/Hindi Part 3 of 60 Hello World
How to write a program
How to Compile Java Program
How to Run a Program
public class Example
{
public static void main(String args[])
{
System.out.println("Hello World");
}
}
Save as your class name like Example.java
Open command prompt
cd desktop
javac Example.java
Write down java Example then get Output
Java Programming in Urdu/Hindi Part 4 of 60 Variables & Data Types
Variable
Data Types
Keyword
public class Example1
{
public static void main(String args[])
{
int a= 5;
double a= 5.6;
System.out.println("Value is -"+a);
}
}
Compile:
command prompt
cd desktop
javac Example1.java
java Example1
Java Programming in Urdu/Hindi Part 5 of 60 Arithmatic Operators
public class Example1
{
public static void main(String args[])
{
int a= 5;
int b= 2;
int c= a+b;
int d= a-b;
int e= a*b;
int f= a/b;
int g= a%b;
int h= a++;
int i= a+-;
System.out.println("Value is -"+c);
System.out.println("Value is -"+d);
System.out.println("Value is -"+e);
System.out.println("Value is -"+f);
System.out.println("Value is -"+g);
System.out.println("Value is -"+h);
System.out.println("Value is -"+i);
}
}
Java Programming in Urdu/Hindi Part 7 of 60 If-else statement
public class Example1
{
public static void main(String args[])
{
int marks= 56;
if (marks>=50){System.out.println("Passed");}
else {System.out.println("Failed");}
}
}