TODAY JAVA SCHOOL

In java school, programming, design, computer general knowledge, web application, software, web services, social media, digital marketing, oops, concept of programming language, oops feature, console media, graphics medium, first programming, c, c ++ , Java, PHP, SQL, MySQL, HTML, HTML_5, J_query, JavaScript, Bootstrap, Framework, images with logos, examples, shared and explained.

https://www.amazon.in/b?node=26373545031&linkCode=ll2&tag=1234567801cdb-21&linkId=3b9882431b00409b44141e0344b35a15&language=en_IN&ref_=as_li_ss_tl

Breaking

Tuesday, 3 December 2019

how to set java path in windows 10 | path set in java

Path Setup

      1.    Open This PC (My Computer)  

      2. Right click on anywhere on blank   
    area. (not or any drive or any other icon) then click on properties


java path seting in cmd
java path seting







 

      3.    Click on Advanced System Setting (Left side on screen).


 path environment variable windows 10 | path seting windows 10,
javapath seting in windows 10






     

      4. Environment Variable


java path setting, how to  path envirment variable  in windows 10
java path seting


    5.    Click on new on user variable (upper section). Then type “path” in variable name and “C:\Program Files\Java\jdk1.8.0_144\bin” in variable value. Then click on ok.


path environment variable windows 10
java path 

   6.    Click on ok then again ok.

Check installation and path setup-Open command prompt (cmd) and check path variable is successfully set or not.
1.    Search for cmd on start button and click on it.

set path windows 10
java pathseting in cmd

2.    Type “javac” in command prompt then hit enter.

  java path setting,
java path cmd

Note-If “javac” is recognized in your cmd it means installation and path variable setup process successful and you will get output like above screenshot else process failed you need to check your mistake.

How to create ,save, compile and run java program-

1.    Type the following code in notepad or notepad++.
class Demo
{
public static void main(string agrs[])
{
System.out.println(“Hello java”);
}
2.    Press Control + S to save the program.
3.    Select the location where you want to save the program and . Type file name “Demo.java” is name section then select All type in save as type click on save.
 
set path command line
path variable seting


4.    Type “cmd” then hit Enter button in address bar of same location you have saved your java program to open command prompt in the location.

java path variable windows 10
varible seting


5.    Type “javac Demo.java” in cmd then  hit enter to compile program (javac is a command that is used to compile java file and Demo.java is name of current java program file).


6.    Type “Java Demo”(java is command that is used to run java bytecode and Demo is main class name is current program.)
 | java path setting
java path seting in CMD.

System.out.println():-

This statement is used to print text on the screen as output, where system is a predefined class, and out is an object of the PrintWriter class defined in the system. The method prints the text on the screen with a new line.

Comments in Java:-

Single Line-//……
Multi Line-/*…………………………………*/

Naming Conventions-

1.    Variable names can begin with a letter, underscore, currency character.
Ex-age, name, _address, emp1_Add, etc.
2.    Constant variable should be written using all capital letters.
Ex-MAX, VALUEetc.
3.    Each word of class name and interface name start with a capital letter.
String, StringBuffer, DataInputStream etc.
4.    Method name start with a small letter, then each word start with capital letter.
Ex-Println(), readLine(), getChars() etc.
5.    Package nae in java are written in small letter.
Ex-java.io;

 

 

No comments:

Post a Comment