How to make program with Notepad/BlueJ

Making Program with Notepad


First of all you need to read my previous post if you don't know how to install Java Click here to read

Now follow the following steps to make program with notepad

NOTE:- I'am using Notepad++ Software to write my program you can use your usual notepad if you want to download Notepad++ then Click Here


  • Open your notepad or notepad++ anywhere because you can change its destination path later.










  • Now write your program on your notepad. Here I'am making the world's simplest program to print "hello world" :)


    • After finishing your program Press Ctrl+S to save your program and save your program with .java at this step you can change its destination as per your choice.
    • Now you have to be careful while saving your program you have to use exact name as you have use for your class name.

    • Now press Win+R and write cmd to open Command prompt.

    • Now its time to compile your program to do that you have to visit to your program using command prompt. I have save my program on Desktop so I will visit to Desktop.
    • If your command prompt terminal is open then type cd Desktop


    • Now type javac  Sample.java to compile your program (In place of Sample you have to type your class name that you have use while making program)

    • If there will any syntax error then you have to fix that, if you found no syntax error then type java Sample.(This statement is use to run a program)


    Making program with BlueJ

    Making program with BlueJ is quite simple comparing to notepad. Just follow the following instruction.

    • To make your program with BlueJ you have to open your project folder if you don't know how to make that then read my previous post Click here to read .
    • Double click on package.


    • Click on New class..

    • Write the class name and press enter.

    • Remove whatever is written in the program and make your own Program.




    • Click on compile or press ctrl+k to compile the program.


    • Now close your program and left click on the program followed by void main(String args[])





    I hope you like this post and still if you have any doubt then comment me on the comment section.
    I will do my best to answer you queries.

    Comments

    Popular posts from this blog

    [Question 3] ISC 2017 Computer Practical Paper Solved – Caesar Cipher.

    Pattern of your own name.

    Designing Patterns - Print 'Z'.