• Register
1 vote
208 views

Problem:

I am trying to run a simple java program using Eclipse. My program is returning something suspicious message (process finished with exit code 0). What is it?
Please, find my sample code below and let me know how to fix the error.

import java.util.Scanner;
public class Example{
    public static void main(String[] args){
        System.out.println("Enter the number here: ");
        Scanner sc = new Scanner(System.in);
        int num  =  sc.nextInt();
        while(num > 0){
            System.out.println(num);
            num--;
        }
    }
}

Many many thanks for your help, guys. I am really looking forward to have your help.

12 7 7
15,250 points

Please log in or register to answer this question.

1 Answer

1 vote

Solution:

I guess, the question is answered earlier. Please follow this thread. In your case, you are getting the message for java this is the only difference. Your code seems to be absolutely fine, and there is no single reason that the compiler can raise a flag against it.

Note: finished with exit code 0 means your code executed perfectly. If it was with exit code non-zero it would have been an issue to be worried.
Good Day!

13 9 6
94,260 points

Related questions

0 votes
1 answer 39 views
39 views
Problem: I'm having trouble starting my java emulator. Nothing appears to load. Pixel 2 API 26 java Linux Ubuntu 16.04 LTS 64-bit.If the Emulator does not start properly, this problem is often caused by problems with HAXM. HAXM issues are often the ... technologies, incorrect settings, or an out-of-date HAXM driver. Try reinstalling the HAXM driver, using the steps detailed in Installing HAXM.
asked Dec 6, 2020 Mashhoodch 13k points
0 votes
1 answer 5 views
5 views
Problem: I've updated android studio from 3.0 to 3.0.1 but when I launch Emulator it didn't get launched and gives message in event log: Emulator: Process finished with exit code 0
asked Apr 7 nabin 3.2k points
0 votes
1 answer 45 views
45 views
Problem: this is an error, how can I overcome the error: Process finished with exit code 0 python.
asked Mar 14 Wafa Abu Yousef 6.1k points
1 vote
1 answer 1.7K views
1.7K views
Problem: Hello guys, I am learning python nowadays. I am noticing something awkward in my IDE. I am using the pycharm as my daily IDE. Whenever I am running a program my pycharm shows a message process finished with exit code 0. Let’s say if I wan to print print(" ... code 0. I don’t understand what is this! Is that an error message? If this is an error, how can I overcome the error?
asked Apr 9, 2020 Gavin 15.3k points
1 vote
1 answer 4 views
4 views
Problem: I need a help , How I can fix this : process finished with exit code -1
asked Mar 31 MUHAMMAD MUNEEB 83k points
1 vote
1 answer 2 views
2 views
Problem: How to fix this error : process finished with exit code -1073741515 (0xc0000135)
asked Mar 31 MUHAMMAD MUNEEB 83k points
1 vote
1 answer 2 views
2 views
Problem: Can anyone tell me the solution of this problem? process finished with exit code -1073741819
asked Mar 31 MUHAMMAD MUNEEB 83k points
1 vote
1 answer 4 views
4 views
Problem: Any ideas on what I need to do to fix this? process finished with exit code -1073741819 (0xc0000005)
asked Mar 31 MUHAMMAD MUNEEB 83k points
1 vote
1 answer 3 views
3 views
Problem: Please help me. How can I solve it? process finished with exit code 11
asked Mar 31 MUHAMMAD MUNEEB 83k points
0 votes
1 answer 70 views
70 views
Problem Process finished with exit code 139 (interrupted by signal 11: sigsegv)
asked Feb 11 charles mathews 5.5k points