Click here to Skip to main content
15,888,579 members
Home / Discussions / Java
   

Java

 
AnswerRe: Using for loop create a bluej program for the question( https://1drv.ms/u/s! Ajrld_fzlfykhx8hc1sbkiufuc_p ) Pin
Richard MacCutchan27-Oct-20 5:24
mveRichard MacCutchan27-Oct-20 5:24 
GeneralRe: Using for loop create a bluej program for the question( https://1drv.ms/u/s! Ajrld_fzlfykhx8hc1sbkiufuc_p ) Pin
User 1494142127-Oct-20 5:39
User 1494142127-Oct-20 5:39 
GeneralRe: Using for loop create a bluej program for the question( https://1drv.ms/u/s! Ajrld_fzlfykhx8hc1sbkiufuc_p ) Pin
User 1494142127-Oct-20 5:38
User 1494142127-Oct-20 5:38 
GeneralRe: Using for loop create a bluej program for the question( https://1drv.ms/u/s! Ajrld_fzlfykhx8hc1sbkiufuc_p ) Pin
Richard MacCutchan27-Oct-20 5:42
mveRichard MacCutchan27-Oct-20 5:42 
GeneralRe: Using for loop create a bluej program for the question( https://1drv.ms/u/s! Ajrld_fzlfykhx8hc1sbkiufuc_p ) Pin
User 1494142127-Oct-20 5:46
User 1494142127-Oct-20 5:46 
GeneralRe: Using for loop create a bluej program for the question( https://1drv.ms/u/s! Ajrld_fzlfykhx8hc1sbkiufuc_p ) Pin
Richard MacCutchan27-Oct-20 5:56
mveRichard MacCutchan27-Oct-20 5:56 
GeneralRe: Using for loop create a bluej program for the question( https://1drv.ms/u/s! Ajrld_fzlfykhx8hc1sbkiufuc_p ) Pin
Richard MacCutchan27-Oct-20 7:10
mveRichard MacCutchan27-Oct-20 7:10 
AnswerRe: Write a program using for loop that computes sinx and cosx by using the following power series- sinx=x-x^3/3!+x^5/5!-x^7/7!+.... cosx=1-x^2/2!+x^4/4!-x^6/6!+..... Note-(Here ! is used for factorial of that number and ^ for "power of" Pin
Patrice T6-Nov-20 15:59
mvePatrice T6-Nov-20 15:59 
Quote:
My problem is that I am not understanding that whether the source code I wrote is correct or not

Your code do not behave the way you expect, or you don't understand why !

There is an almost universal solution: Run your code on debugger step by step, inspect variables.
The debugger is here to show you what your code is doing and your task is to compare with what it should do.
There is no magic in the debugger, it don't know what your code is supposed to do, it don't find bugs, it just help you to by showing you what is going on. When the code don't do what is expected, you are close to a bug.
To see what your code is doing: Just set a breakpoint and see your code performing, the debugger allow you to execute lines 1 by 1 and to inspect variables as it execute.

Debugger - Wikipedia, the free encyclopedia[^]

Mastering Debugging in Visual Studio 2010 - A Beginner's Guide[^]
Basic Debugging with Visual Studio 2010 - YouTube[^]

1.11 — Debugging your program (stepping and breakpoints) | Learn C++[^]

The debugger is here to only show you what your code is doing and your task is to compare with what it should do.
Patrice

“Everything should be made as simple as possible, but no simpler.” Albert Einstein

AnswerInterview Question locking for Ans Pin
sureshkct26-Oct-20 4:52
sureshkct26-Oct-20 4:52 
QuestionRe: Interview Question locking for Ans Pin
Richard MacCutchan26-Oct-20 5:34
mveRichard MacCutchan26-Oct-20 5:34 
GeneralRe: Interview Question locking for Ans Pin
Dave Kreskowiak27-Oct-20 6:54
mveDave Kreskowiak27-Oct-20 6:54 
QuestionJAVA IF ELSE STATEMENT (HELP ME) Pin
tomatomoa24-Oct-20 7:45
tomatomoa24-Oct-20 7:45 
AnswerRe: JAVA IF ELSE STATEMENT (HELP ME) Pin
Sandeep Mewara24-Oct-20 8:17
mveSandeep Mewara24-Oct-20 8:17 
GeneralRe: JAVA IF ELSE STATEMENT (HELP ME) Pin
tomatomoa3-Nov-20 2:18
tomatomoa3-Nov-20 2:18 
GeneralRe: JAVA IF ELSE STATEMENT (HELP ME) Pin
Richard MacCutchan3-Nov-20 3:11
mveRichard MacCutchan3-Nov-20 3:11 
QuestionLooking for a node.js developer for advanced disk wiping software (Almost complete) Pin
fixapc22-Oct-20 5:45
fixapc22-Oct-20 5:45 
AnswerRe: Looking for a node.js developer for advanced disk wiping software (Almost complete) Pin
Richard MacCutchan22-Oct-20 6:09
mveRichard MacCutchan22-Oct-20 6:09 
QuestionLog4j2 Migration Pin
Member 1496731916-Oct-20 4:21
Member 1496731916-Oct-20 4:21 
AnswerRe: Log4j2 Migration Pin
Richard MacCutchan16-Oct-20 4:38
mveRichard MacCutchan16-Oct-20 4:38 
QuestionJackson ObjectMapper valueToTree method also write valueType and integral but no actual value Pin
Manish K. Agarwal11-Oct-20 23:02
Manish K. Agarwal11-Oct-20 23:02 
QuestionWhy can't we make a sign up with phone number in android studio project Pin
Member 145474583-Oct-20 2:46
Member 145474583-Oct-20 2:46 
Question2d java graphics Pin
Member 149532531-Oct-20 2:07
Member 149532531-Oct-20 2:07 
AnswerRe: 2d java graphics Pin
CHill601-Oct-20 2:09
mveCHill601-Oct-20 2:09 
AnswerRe: 2d java graphics Pin
Richard MacCutchan1-Oct-20 3:02
mveRichard MacCutchan1-Oct-20 3:02 
Questionjava programmimg Pin
Member 1494135617-Sep-20 19:36
Member 1494135617-Sep-20 19:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.