Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Program to print 1
1 2
1 2 3
1 2 3 4 like that

Answer Posted / sunil pradhan

public class program1 {

public static void main(String[] args){

for(int i = 1; i<=5 ;i++){

for(int k = 1; k<=i; k++){

System.out.print(k);
}
System.out.println("\n");
}

}

}

Is This Answer Correct ?    6 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a parameter used for?

957


How does sublist works in java?

972


How to instantiate member inner class?

1075


Why super is first line in java?

1046


why doesn't java run on all platforms?

1023


What does string [] args mean?

1005


Is java se free?

935


Why wait and notify methods are declared in object class?

1035


Are primitives objects?

1050


What is the base class of all exception classes?

1065


Can a final variable be initialized in constructor?

969


why java does not support unsigned keyword?

5253


what is nested class in java?

1170


Is it possible to use Semaphore/ Mutex in an Interrupt Handler?

1086


Is cout buffered?

1180