What am I missing with this Prime number counter code using int method? // I'm beginner to Java, sorry if it...

Multi tool use
up vote
-5
down vote
favorite
The method it takes two int int arguments.
static int primeCount(int start, int end) {
int count = 0;
for(int i = start; i <= end; i++) {
if(i == 2 || i % 2 != 0)
count++;
}
return count;
}
java
New contributor
T. Mil is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
put on hold as off-topic by πάντα ῥεῖ, 200_success, Sᴀᴍ Onᴇᴌᴀ, Mast, Martin R 8 hours ago
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "Code not implemented or not working as intended: Code Review is a community where programmers peer-review your working code to address issues such as security, maintainability, performance, and scalability. We require that the code be working correctly, to the best of the author's knowledge, before proceeding with a review." – πάντα ῥεῖ, 200_success, Sᴀᴍ Onᴇᴌᴀ, Mast, Martin R
If this question can be reworded to fit the rules in the help center, please edit the question.
add a comment |
up vote
-5
down vote
favorite
The method it takes two int int arguments.
static int primeCount(int start, int end) {
int count = 0;
for(int i = start; i <= end; i++) {
if(i == 2 || i % 2 != 0)
count++;
}
return count;
}
java
New contributor
T. Mil is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
put on hold as off-topic by πάντα ῥεῖ, 200_success, Sᴀᴍ Onᴇᴌᴀ, Mast, Martin R 8 hours ago
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "Code not implemented or not working as intended: Code Review is a community where programmers peer-review your working code to address issues such as security, maintainability, performance, and scalability. We require that the code be working correctly, to the best of the author's knowledge, before proceeding with a review." – πάντα ῥεῖ, 200_success, Sᴀᴍ Onᴇᴌᴀ, Mast, Martin R
If this question can be reworded to fit the rules in the help center, please edit the question.
add a comment |
up vote
-5
down vote
favorite
up vote
-5
down vote
favorite
The method it takes two int int arguments.
static int primeCount(int start, int end) {
int count = 0;
for(int i = start; i <= end; i++) {
if(i == 2 || i % 2 != 0)
count++;
}
return count;
}
java
New contributor
T. Mil is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
The method it takes two int int arguments.
static int primeCount(int start, int end) {
int count = 0;
for(int i = start; i <= end; i++) {
if(i == 2 || i % 2 != 0)
count++;
}
return count;
}
java
java
New contributor
T. Mil is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
T. Mil is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
edited 10 hours ago
New contributor
T. Mil is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
asked 10 hours ago
T. Mil
13
13
New contributor
T. Mil is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
T. Mil is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
T. Mil is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
put on hold as off-topic by πάντα ῥεῖ, 200_success, Sᴀᴍ Onᴇᴌᴀ, Mast, Martin R 8 hours ago
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "Code not implemented or not working as intended: Code Review is a community where programmers peer-review your working code to address issues such as security, maintainability, performance, and scalability. We require that the code be working correctly, to the best of the author's knowledge, before proceeding with a review." – πάντα ῥεῖ, 200_success, Sᴀᴍ Onᴇᴌᴀ, Mast, Martin R
If this question can be reworded to fit the rules in the help center, please edit the question.
put on hold as off-topic by πάντα ῥεῖ, 200_success, Sᴀᴍ Onᴇᴌᴀ, Mast, Martin R 8 hours ago
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "Code not implemented or not working as intended: Code Review is a community where programmers peer-review your working code to address issues such as security, maintainability, performance, and scalability. We require that the code be working correctly, to the best of the author's knowledge, before proceeding with a review." – πάντα ῥεῖ, 200_success, Sᴀᴍ Onᴇᴌᴀ, Mast, Martin R
If this question can be reworded to fit the rules in the help center, please edit the question.
add a comment |
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
HA8 ro9Sk6K,z,D1,VeKeNVxpsgraxM7Obj51JS Rq rf 3,otvE0GqdM4GC7eAsB v0BHfgC,4AU4jhnCzg0ELLXN5SWn,pV3KhtBIMhYI