Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
67% Quality Score
Upvotes Received
2
Posts with Upvotes
2
Upvoting Members
2
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
0 Endorsements
Ranked #2K
~10.4K People Reached
Favorite Tags

20 Posted Topics

Member Avatar for kdeep

[QUOTE]PROBLEM #1: You have already created an array named NUMBERS with 20cells. You are to initialize all of the cells with odd subscripts to 1 and all of the cells with even subscripts to 2. MY TAKE ON IT: I <-- 1 DOWHILE I<= 20 NUMBERS (I) <-- 1 I …

Member Avatar for Momerath
0
1K
Member Avatar for sidlampard
Member Avatar for jips11in

1 is not technically a prime number either so it is not true to print it out as prime with two and three.

Member Avatar for masijade
0
159
Member Avatar for tjsail

Hey Everyone... Not quite sure how it works on these forums as this is my first post, but I am looking to separate elements of lines printed to a text file in real-time for a log parser. An example of the text output is: [INDENT][CHAT WINDOW TEXT] [Sun Nov 29 …

Member Avatar for rohini.vangury
0
518
Member Avatar for nolimit966

as in: [code] int total; for (int i = 0; i<100; i++) { if (i%2==1) total+=i; } [/code] ? I think that would server your intended function, but i would do it without modulus and change the for loop to look like: [code] for(int i = 1; i<100; i+2) { …

Member Avatar for tjsail
0
746
Member Avatar for tjsail

Is this possible to do? I am looking to parse some data out of a file and based on the results of this take names found in the file and create objects out of them. for example... [code] //you have parsed the name Bob out of a file and it …

Member Avatar for JamesCherrill
0
5K
Member Avatar for tjsail

Is it possible to read a file as lines are written to it but not lose your location in the file? As in there is a program that will write lines of text to a file until it reaches 2.4MB. I want to read this file as these lines of …

Member Avatar for tjsail
0
135
Member Avatar for tjsail

Hey guys, so i've posted here before about regex, and i was told that some of you may be able to check my regexes for errors after i have created them. I have one that looks like it should work to me, but it absolutely will not. [code] public static …

Member Avatar for ~s.o.s~
0
113
Member Avatar for Prachi Doshi

go to [url]www.javabat.com[/url] if you want some practice problems. its beyond useful, and even has solution code to some problems if you get stuck. TJ

Member Avatar for Prachi Doshi
0
157
Member Avatar for PuQimX

the code for the error would be written as [code] for(count=0; count<num_of_scores; count++) { System.out.print("Enter the scores "); score[count]=input.nextInt(); if (score[count]<0 || score[count]>100) break; sum += score[count]; } [/code] in order to ignore the lowest score, i would use an ArrayList as such: [code] //ArrayList variable public ArrayList<Integer> score = …

Member Avatar for tjsail
0
210
Member Avatar for Dasau

it would be: [code] else if (Earn>=116 && Earn<=200) { //statement to execute here } [/code] hope this helps. TJ

Member Avatar for stultuske
0
66
Member Avatar for JuicedBrain

for the part [code]//How do I step into this Loop? while ( repeat =='Y'|| repeat =='y');[/code] i believe that using [code] while ( repeat.equalsCaseInsensitive("Y")) { }[/code] will enable you to enter the loop... iirc, you need to use .equals() to compare two strings, not the == operator. TJ

Member Avatar for javaAddict
0
133
Member Avatar for sammen89

well first off you need to initialize a scanner using [code]Scanner song = new Scanner(System.in);[/code] and then you need to call in the .nextline() method to grab all of the information the user inputs until they hit enter. TJ

Member Avatar for Um num num
0
157
Member Avatar for P00dle

Sorry, i'm a newer programmer so i am not sure what you mean by the & needs to be escaped, but if you take a look at my thread about regex you may find it helpful. [URL="http://www.daniweb.com/forums/thread242302.html"]Parsing Lines of a File[/URL] TJ

Member Avatar for P00dle
0
87
Member Avatar for samarudge

Try this: [URL="http://java.sun.com/j2se/1.4.2/docs/api/javax/sound/midi/package-summary.html"]http://java.sun.com/j2se/1.4.2/docs/api/javax/sound/midi/package-summary.html[/URL] TJ

Member Avatar for samarudge
0
84
Member Avatar for gasou

Okay, so the formulas for temperature are: F = 1.8*C + 32 C = (F-32)/1.8 try incorporating these into your program using if/else statements checking for whether or not it is celcius. After you do this, come back with your new code and i can help you out more if …

Member Avatar for gasou
0
637
Member Avatar for Shotty

[CODE]for(int i = 1; i <= rows; i++) { for(int j = 1; j <=columns; j++) r = r + " _"; r = r + "\n"; }[/CODE] Your nested "if" statement's statements are not defined correctly, and/or your indenting is problematic. I BELIEVE your code should look like this: …

Member Avatar for javaAddict
0
133
Member Avatar for tjsail

Hey everyone- my name is TJ, and I am currently taking an AP Computer Science class in my high school. We are learning java, so most if not all of my quetions will be java related. Right now, I am undertaking a project for an online gaming community I participate …

0
42
Member Avatar for weylinthedirty

why wouldnt you put the whole body of the main method inside a while (true) { } loop so that it infinitely loops until you hit submit with nothing selected or some such thing. I believe the technical term for what i am trying to say is make it a …

Member Avatar for weylinthedirty
0
199
Member Avatar for subhankar02dey

You would not want to use else if, because if a number is a multiple of say 2 and 5, it will only print "This" istead of printing "This Java". TJ

Member Avatar for tjsail
0
139

The End.