Get your CodeRanch badge!*
The moose likes Beginning Java and the fly likes How to print value and the number of times it appear in a array? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "How to print value and the number of times it appear in a array?" Watch "How to print value and the number of times it appear in a array?" New topic
Author

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

azuki ooh
Greenhorn

Joined: Nov 07, 2008
Posts: 20
I just can't get it to work.

Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9280
    
  17

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 ]

SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 13868
    
  10

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 ]

Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to print value and the number of times it appear in a array?
 
Similar Threads
The return statement question
I need Help
question on array and printing
How would i break this down into seperate metods?
create calendar java