Click here to Skip to main content
16,005,682 members
Home / Discussions / Java
   

Java

 
AnswerRe: Why is my Java Code not compiling? Pin
Richard MacCutchan28-Oct-09 0:30
mveRichard MacCutchan28-Oct-09 0:30 
QuestionCode explanatoin Pin
WebMaster26-Oct-09 5:02
WebMaster26-Oct-09 5:02 
AnswerRe: Code explanatoin Pin
Richard MacCutchan26-Oct-09 6:07
mveRichard MacCutchan26-Oct-09 6:07 
Questionlet me know the path for html pages Pin
kirancgi26-Oct-09 4:42
kirancgi26-Oct-09 4:42 
QuestionRE: Please Comment on the Java Code and Make Revisions If Necessary Pin
srbruno25-Oct-09 12:16
srbruno25-Oct-09 12:16 
AnswerRe: RE: Please Comment on the Java Code and Make Revisions If Necessary Pin
Nagy Vilmos25-Oct-09 22:54
professionalNagy Vilmos25-Oct-09 22:54 
Questioncount if statement Pin
Shakirin Amin25-Oct-09 11:18
Shakirin Amin25-Oct-09 11:18 
AnswerRe: count if statement Pin
Richard MacCutchan25-Oct-09 12:55
mveRichard MacCutchan25-Oct-09 12:55 
Shakirin Mohd Amin wrote:
if(a.contains("if") || a.contains("if else") || a.contains("if else") || a.contains("else"))
count++;

but this code will count ALL WORD contain "if".
do u have any suggestion?


Why test for "if else" twice when you have already tested for "if", and why are you counting "else" statements when you are trying to get the count of "if"s?

To do this properly you need to break each line into tokens of whole words and then look for "if" statements. You will also need to ignore comments in such lines as that will possibly give incorrect results.
GeneralRe: count if statement Pin
Shakirin Amin26-Oct-09 5:11
Shakirin Amin26-Oct-09 5:11 
QuestionGantt Chart's Task Bar Pin
sorrol24-Oct-09 23:48
sorrol24-Oct-09 23:48 
AnswerRe: Gantt Chart's Task Bar Pin
427748025-Oct-09 0:00
427748025-Oct-09 0:00 
GeneralRe: Gantt Chart's Task Bar Pin
sorrol25-Oct-09 16:27
sorrol25-Oct-09 16:27 
QuestionPractical numbers Pin
rics 224-Oct-09 22:35
rics 224-Oct-09 22:35 
AnswerRe: Practical numbers Pin
Richard MacCutchan24-Oct-09 23:23
mveRichard MacCutchan24-Oct-09 23:23 
AnswerRe: Practical numbers Pin
427748025-Oct-09 0:01
427748025-Oct-09 0:01 
AnswerRe: Practical numbers Pin
yohoprashant7-Nov-09 5:37
yohoprashant7-Nov-09 5:37 
QuestionNeed to Confirm Creation of a Array List of Entry Objects Pin
srbruno24-Oct-09 15:57
srbruno24-Oct-09 15:57 
AnswerRe: Need to Confirm Creation of a Array List of Entry Objects Pin
427748025-Oct-09 0:03
427748025-Oct-09 0:03 
QuestionBeginner to java Pin
ammu2324-Oct-09 5:05
ammu2324-Oct-09 5:05 
AnswerRe: Beginner to java Pin
Nuri Ismail24-Oct-09 5:51
Nuri Ismail24-Oct-09 5:51 
GeneralRe: Beginner to java Pin
ammu2326-Oct-09 19:59
ammu2326-Oct-09 19:59 
Question5 drawings in 5 rectangular regions within one window Pin
WebMaster23-Oct-09 20:19
WebMaster23-Oct-09 20:19 
AnswerRe: 5 drawings in 5 rectangular regions within one window Pin
427748024-Oct-09 0:52
427748024-Oct-09 0:52 
GeneralRe: 5 drawings in 5 rectangular regions within one window Pin
WebMaster24-Oct-09 1:10
WebMaster24-Oct-09 1:10 
GeneralRe: 5 drawings in 5 rectangular regions within one window Pin
427748024-Oct-09 2:50
427748024-Oct-09 2:50 

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.