-
Notifications
You must be signed in to change notification settings - Fork 0
JAVA
Gaurav Walia edited this page Oct 4, 2018
·
3 revisions
git clone https://github.com/GauravWalia19/RAINBOW.git
cd ~
cd Downloads
cd RAINBOW-master || cd RAINBOW
cd src/JAVA
bash java.sh
3. If U want to use in your code than create a file with extension of java (hello.java) in JAVA folder. Write the code given below:
Terminal
touch hello.java
Open file hello.java in Text Editor and write code given below:
public class hello
{
public static void main(String[] args)
{
rain obj = new rain();
System.out.println(obj.BRED + "Hello World" + obj.RESET);
rainbow ob = new rainbow();
System.out.println(ob.getBRED("Hello World"));
}
}
javac hello.java
java hello
You can simply used JAVA PACKAGE to do use it.Follow the steps below:
git clone https://github.com/GauravWalia19/RAINBOW.git
cd ~
cd Downloads
cd RAINBOW-master || cd RAINBOW
cd src
- Create a sample file of java to run it
touch trial.java
- Enter the following code in that file
import RAINBOW.*;
public class trial
{
public static void main(String[] args)
{
Rainbow r = new Rainbow();
System.out.println(r.getBBGDGREEN("HELLO WORLD")+r.getRESET());
Rain R = new Rain();
System.out.println(R.BRED+"hello world"+R.RESET);
}
}
- Compile and run using commands
javac trial.java
java trial