class Exercise1
{
public static void main(String args[])
{
System.out.println();
System.out.println("Hello World !");
System.out.println();
System.out.println("It's been nice knowing you.");
System.out.println();
System.out.println("Goodbye world !");
System.out.println();
}
}
class Exercise2
{
public static void main(String args[])
{
System.out.println("======================================");
System.out.println();
System.out.println("= Student Information =");
System.out.println();
System.out.println("======================================");
System.out.println();
System.out.println("= Name : ARDP Ranasinghe =");
System.out.println();
System.out.println("= Reg No : DIS\\08\\M4\\1234 =");
System.out.println();
System.out.println("= Address : Malabe =");
System.out.println();
System.out.println("======================================");
}
}
class Exercise3
{
public static void main(String args[])
{
System.out.println();
System.out.println();
System.out.println("* * * * *");
System.out.println();
System.out.println("* * * * *");
System.out.println();
System.out.println("* * * * *");
System.out.println();
System.out.println("* * * * *");
System.out.println();
System.out.println();
System.out.println(" *");
System.out.println();
System.out.println(" * *");
System.out.println();
System.out.println(" * * *" );
System.out.println();
System.out.println(" * * * *");
System.out.println();
System.out.println();
}
}
class Exercise4
{
public static void main(String args[])
{
System.out.println();
System.out.println();
System.out.println("* * * * * *");
System.out.println();
System.out.println("* * * * * * * ");
System.out.println();
System.out.println("* * * * * * * *");
System.out.println();
System.out.println("* * * * * * * * * *");
System.out.println();
System.out.println();
}
}
class Exercis3loops
{
public static void main(String args[])
{
System.out.println();
System.out.println();
for(int row=1; row<=4; row++)
{
for(int i=1; i<=5; i++)
{
System.out.print("* ");
}
System.out.println();
}
System.out.println();
for(int r=1; r<=5; r++)
{
for(int x=6; x>=r; x--)
{
System.out.print(" ");
}
for(int s=1; s<=r; s++)
System.out.print("* ");
System.out.println();
}
System.out.println();
}
}
P.S - Recently I closed the blog as I was continuously receiving bad comments from 'Anonymous' people. But after much thought I decided to continue writing my blog.
-Tharindu Edirisinghe-
-SLIIT 10'-
5 comments:
Nice.......
Disable Anonymous comments and use comment moderation feature.
This is a great resource for new SLIIT students.
Thank you malli!
Thanks aiyaa. Your blog is a great resource to learn Java.
ados this is an maxxa work.. keep it up bro.
Niranga Jayakody(c2)
ela machoo !!!!!
Post a Comment