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...


Hi friends i want display Triangle shap stars(*) please can
tell me any one java code logic?
*
***
*****
******* Like this

Answers were Sorted based on User's Feedback



Hi friends i want display Triangle shap stars(*) please can tell me any one java code logic? ..

Answer / sadikhasan palsaniya

public class Test{
public static void main(String var[]){
int c=1;
for(int i=1;i<=4;i++){
for(int k=4;k>=i;k--)
System.out.print(" ");
for(int j=1;j<=c;j++){
System.out.print("*");
}
System.out.println("");
c=c+2;
}
}
}

Is This Answer Correct ?    14 Yes 5 No

Hi friends i want display Triangle shap stars(*) please can tell me any one java code logic? ..

Answer / royal

Thanks Sadik............

Is This Answer Correct ?    4 Yes 0 No

Post New Answer

More Core Java Interview Questions

what is ejb? what is the importance of ejb?

2 Answers   Photon,


What is a java developer salary?

0 Answers  


What is final keyword?

0 Answers  


What are the methods to rectify ambiguities in the interfaces in JAVA?

0 Answers   CGI,


What is “try and catch” in java

5 Answers   Cap Gemini, TCS,


What is identifier give example?

0 Answers  


How is string immutable in java?

0 Answers  


What are the advantages of inner classes?

0 Answers  


we cannot create an object of interface but we can create a variable of it

1 Answers  


What is namespace in java?

0 Answers  


Which non-unicode letter characters may be used as the first character of an identifier?

0 Answers  


What do you mean by platform independence? What is an interface?

0 Answers  


Categories