I added a Breakpoint here:
public class JavaApplication8 {
I added another here:
public static void main(String[] args) {
Finally, I added one more here:
Scanner input = new Scanner(System.in);
Ctrl + F5 is supposed to start the debugger, right. Mine doesn't work. When I hit Ctrl+F5, another window opens and it's called 'Class.java'. If I just try to run the code by hitting F6, the code simply runs and none of the break points are hit. This is so weird. I've never seen anything like it. Does anyone have any idea what could be wrong here?
Here is my code.
package javaapplication8;
import java.util.Scanner;
public class JavaApplication8 {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
System.out.println("Celsius of your input is Fahrenheit degree ");
double myinput = input.nextInt();
System.out.println(myinput + 32 * (9/5));
}
}
I want to debug this, so I can learn how the debugger works. Also there really is something wrong with this code. It just adds 32 to whatever number I enter. The 9/5 is never hit, which is very weird.