• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to print value and the number of times it appear in a array?

 
azuki ooh
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I just can't get it to work.

 
Ankit Garg
Sheriff
Posts: 9528
32
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is this your homework. There is a rule here Do Your Own Homework

But just to give you a hint, I think there is a problem here

for (int i = x++; i<array.length; i++)
[ November 07, 2008: Message edited by: Ankit Garg ]
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Posts: 15441
41
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch.

It looks like this question is not really about the SCJP exam. I will move it to a more appropriate forum for you. Click the link at the top of the page to continue.

Please explain in more detail what doesn't work. Just saying "it doesn't work" makes it hard to help you solve the problem.
[ November 07, 2008: Message edited by: Jesper Young ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic