Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to use arrays

 
miera iera
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
author & internet detective
Marshal
Posts: 34410
346
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
miera iera
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i want to refer the marks as an index .. then want to count how many students get marks >= 60
 
miera iera
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i wishh that the marks will references at the index
 
miera iera
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
please urgently would like to know how to count the number that have marks >=60
 
miera iera
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can you guide me huhu
 
Campbell Ritchie
Sheriff
Pie
Posts: 48968
60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic