aspose file tools*
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
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: 9313
    
  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: 14345
    
  22

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 8 API documentation
 
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?