![how to debug in bluej how to debug in bluej](https://horstmann.com/bigj/help/bluej/debug-3.png)
* Code will not work and will end with "NaN = b" if c is less than a. * Control statements are here to change doubles to ints if the double is a whole number. Input = reader.nextLine().trim().toLowerCase() * Solve problems with the pythagorean theorem.
![how to debug in bluej how to debug in bluej](https://i.stack.imgur.com/TZMDw.png)
#HOW TO DEBUG IN BLUEJ HOW TO#
I've tried looking online, but I don't know how to do it without referencing non static content, or a similar error.Ĭan someone look through my code and tell me the changes I need to make, and also tell me why I need to make these changes for next time?Įdit: All of the if-else statements are to remove the.
![how to debug in bluej how to debug in bluej](https://opensource.com/sites/default/files/uploads/bluej-new.jpg)
We haven't learned how to use static or main, which I know are necessary in Java. I went ahead by myself and learned how to use the scanner class, and made this project that will use the Pythagorean theorem, and also show work. 15:40:26,385 main ERROR Could not create plugin of type class 4j. for element RollingFile 4j.: Arguments given for element RollingFile are invalid: field 'policy' has invalid value 'null'Īt 4j.(AbstractConfiguration.We have been learning Java in school, but we aren't very far. 15:40:26,384 main ERROR The parameter is null: policy 15:40:26,377 main ERROR Could not create plugin of type class 4j. for element RollingFile 4j.: Arguments given for element RollingFile are invalid: field 'policy' has invalid value 'null'Īt 4j.PluginBuilder.injectFields(PluginBuilder.java:208)Īt 4j.PluginBuilder.build(PluginBuilder.java:121)Īt 4j.(AbstractConfiguration.java:1002)Īt 4j.(AbstractConfiguration.java:942)Īt 4j.(AbstractConfiguration.java:934)Īt 4j.(AbstractConfiguration.java:552)Īt 4j.(AbstractConfiguration.java:241)Īt 4j.(AbstractConfiguration.java:288)Īt 4j.(LoggerContext.java:579)Īt 4j.(LoggerContext.java:651)Īt 4j.(LoggerContext.java:668)Īt 4j.(LoggerContext.java:253)Īt 4j.(Log4jContextFactory.java:153)Īt 4j.(Log4jContextFactory.java:45)Īt 4j.LogManager.getContext(LogManager.java:194)Īt 4j.LogManager.getLogger(LogManager.java:581)Īt .ProjectServer.(ProjectServer.java:10) 15:40:26,373 main ERROR The parameter is null: policy However i get the following error message when i execute my batch.file:
#HOW TO DEBUG IN BLUEJ SERIES#
0 // convert angle to radians double sum = radians // the first element of the series boolean minus = true // indicates whether to add or subtract the next element for ( int power = 3 power += 2) ] - %m%n" Ĭopy Code calculate the sin of an angle (in degrees) double radians = (Math.PI * angle) / 180. calculate the factorial of a number double product = number And like all skills, it only improves by use! This is a skill, and it's one which is well worth developing as it helps you in the real world as well as in development. Hopefully, that should help you locate which part of that code has a problem, and what the problem is. Did it do what you expect? If so, move on to the next line. Think about what each line in the code should do before you execute it, and compare that to what it actually did when you use the "Step over" button to execute each line in turn. You can now run your code line-by-line (called "single stepping") and look at (or even change) variable contents as necessary (heck, you can even change the code and try again if you need to). When it reaches the breakpoint, the debugger will stop, and hand control over to you. Put a breakpoint on the first line of the method, and run your app. Once you have an idea what might be going wrong, start using the debugger to find out why.