aspose file tools*
The moose likes Java in General and the fly likes how to use arrays Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "how to use arrays" Watch "how to use arrays" New topic
Author

how to use arrays

miera iera
Greenhorn

Joined: Dec 05, 2012
Posts: 6
i would like to know way to count how many subjects having marks more than 60. how to declare it using an array in java programming . please .. urgently would like to know.

this is my codes




[edited subject and added code tags]
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30516
    
150

Miera,
Welcome to CodeRanch! I edited your post to add code tags to make it easier read. I also edited the subject to UseAMeaningfulSubjectLine.

Now on to your question.

This is really close. new int[10] does create an array. The problem is you aren't storing it in an array.


This is also really close. mark is an array. mark.length is an int. Which do you think you can use to reference an array index?


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
miera iera
Greenhorn

Joined: Dec 05, 2012
Posts: 6
miera iera wrote:i would like to know way to count how many subjects having marks more than 60. how to declare it using an array in java programming . please .. urgently would like to know.

this is my codes




[edited subject and added code tags]
miera iera
Greenhorn

Joined: Dec 05, 2012
Posts: 6
i want to refer the marks as an index .. then want to count how many students get marks >= 60
miera iera
Greenhorn

Joined: Dec 05, 2012
Posts: 6
i wishh that the marks will references at the index
miera iera
Greenhorn

Joined: Dec 05, 2012
Posts: 6
please urgently would like to know how to count the number that have marks >=60
miera iera
Greenhorn

Joined: Dec 05, 2012
Posts: 6
can you guide me huhu
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38793
    
  23
We do not use the word “urgent”. And please read this, too.

What have you been taught about arrays? You can remind yourself with the Java Tutorials section.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to use arrays