/Java-ground

All the programs, written in JAVA will meet here.

Primary LanguageJava

Java-ground

All the programs, written in JAVA will meet here.
To acces Java source code you have to go with some steps.
First after opening Java Ground, click on any folder, each folders consist of Java programs, here we will be doing for Butterfly pattern
image Click on it After clicking on that now click on src/com/sirsha image Then you will find Main.java file image Click over here. And you have done, there you'll find the source code :) image

Now, how to compile it First you have to install Java in your machine (If you are not using online IDE) First open any kind of text editor (Notepad, Notepad++) or any In our scenario we are using Notepad, you can use any.. image Write the code and save the file with extention .java and save it.
And for execution the code open command prompt / terminal (Power shell) After go to the directory in which the file is saved. enter
For compilation javac FileName.java
And for running java ClassName
And we are done!
For better understanding, here is the code which is written on terminal / command prompt. C:\Users\Admin>cd IdeaProjects

C:\Users\Admin\IdeaProjects>cd Butterfly_Pattern

C:\Users\Admin\IdeaProjects\Butterfly_Pattern>cd src

C:\Users\Admin\IdeaProjects\Butterfly_Pattern\src>cd com

C:\Users\Admin\IdeaProjects\Butterfly_Pattern\src\com>cd Sirsha

C:\Users\Admin\IdeaProjects\Butterfly_Pattern\src\com\sirsha>javac main.java

C:\Users\Admin\IdeaProjects\Butterfly_Pattern\src\com\sirsha>java Main

Output of the code image