No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
4 Posted Topics
I'm working on a problem where I need to use a one-dimensional array to write an application that inputs five numbers, each between 10 and 100, inclusive. As each number is read, it displays it only if it is not a duplicate of a number already read. The program should … | |
int x=10; int total=10; do { total += x++; }while(x<15); System.out.println(x); The output of this program will be 15. I don't understand why 15 is the answer. I'm not understanding the arithmetic here. Doesn't the "+=" mean total = total + x? And doesn't x++ mean that the next value … | |
The following is a question from my teacher along with the correct answer: public class IfTest { public static void main (String args[]) { if (true) if (false) System.out.println("a"); else System.out.println("b"); } } The code will compile correctly and display the letter b when run. I have to explain why … | |
Ok, I am having trouble getting this loop to continue. It just asks once and that's it. Here is my code: // ---------------------------------------------------------- // ExamScores.java (Application) // // Author: // Entered by: -- -- // Classes: ExamScores (list all the class files related to this problem) // Date: September 22, … |
The End.