bibiki 18 Posting Whiz

well, you are basically all done. except that your formula for calculating hypotenuse is wrong. and, inside your main method you do not need to declare multiple instances of Hypotenuse objects. one would suffice.

p.s. what you are basically doing is finding the square root of 3*4 in the first case, which of course returns a number near 3.5

bibiki 18 Posting Whiz

String s = "k" and char c = 'k' are different. you either need to tursn String s into a char or char c into a String before comparing. use proper methods for comparing though. hope that helps!

bibiki 18 Posting Whiz

are you trying to have the same method counting both consonants and vowels? this method you provided does not return the number of vowels. it does count the number of vowels, but it does not return it.

bibiki 18 Posting Whiz

seems like there is some trim() method calling going on somewhere under the hood. there are ways to insert a new line inside a string like using "\n". there might be similar for inserting space. I know there is for inserting a tab. consider that instead of just adding an empty string like this " " to your strings. do let us know if that works!

bibiki 18 Posting Whiz

NeverSleepin, I don't use NetBeans. Anyways, as far as a functioning app goes, I think I can have one. I was just sticking my nose here to see your alternative. thanks for your replies, as well. I think you could and should mark your thread as solved since you solved your problem.

James, your level of expertise is obviously way to higher than mine. While you do understand yourself with a great comfort, I am having trouble to :P
Anyways, I shall find me a solution for this particular way of doing the task.

regards to you all.

bibiki 18 Posting Whiz

I just recently had to do a project at school manipulating files. And, I'd use for this project the classes and methods I used for that other project, and I know they would work perfectly fine. the classes are:
FileWriter y = new FileWriter("TextOutput.txt");
FileReader x = new FileReader("aFileInputIsTakenFrom");
BufferedReader input = new BufferedReader(x);
PrintWriter outfile = new PrintWriter(y);
out of curiosity, I wanted to understand these other classes Neversleepin has used, but I can't make any sense out of all this. I pulled these two lines:
File outputFile = new File("TextOutput.txt");

FileOutputStream fos = new FileOutputStream(outputFile);
out of the for loop (I also pulled out of the for loop the fos.close() method). however, my while loop now diverges, and the content inside TextOutput.txt remains void...

bibiki 18 Posting Whiz

how do you stop at half time? mine is not working :(

bibiki 18 Posting Whiz

I put a system.out statement inside the while loop in lines 30-32, and found out that fis.read() returns numerical values. I expected it to return text. however, the numbers are not input in the textOutput file either. I do not know what's going on... could it be .write() method is not what we need or what? James?

bibiki 18 Posting Whiz

what do you mean e.printStackTrace is useful? did that solve your problem? if yes, how?

bibiki 18 Posting Whiz

hehe, thanks James
you sleep well!

bibiki 18 Posting Whiz

James, I know what you mean.
I missed his declaration of int c variable, so I jumped into conclusion there. I am myself learning, and sticking my nose here to learn more than to teach. Anyways, I don't think I gave an answer.. it was just a suggestion. I am waiting to see what turns to be the solution.

bibiki 18 Posting Whiz

i removed the bracket on line 13 and put it immediately after line 50, and the error was removed. however, the content on TextOutput remains void.

bibiki 18 Posting Whiz

line 29 of your code contains an assignment operator (=), while I believe you intended to have a comparison one (==) check whether that helps. plus, lines 12 and 13 contain brackets, they are either unnecessary or the bracket on line 13 should have been somewhere else.

bibiki 18 Posting Whiz

it's all fine I suppose, you just need to give the method some parameters! you declared the variables in the header of your multadd method... whenever you write something like int x, or double some, you are declaring a parameter... hope this helps

bibiki 18 Posting Whiz

@BestJewSinceJC
I noticed that after I posted.

@HelloMe: it does matter. however, i got the code compiling leaving the main method empty, and rewriting brackets. try that!

bibiki 18 Posting Whiz

you have name = CharSet.next()
perhaps what you need is CharSet.nextInt()

bibiki 18 Posting Whiz

try this: string convert_uuencode ( the coded version of your pic/text )

I took from php.net manual. I hope that to be of any help!

update: my bed!!

bibiki 18 Posting Whiz
int x = (int)(Math.random()*4) + 104;[

i forgot to declare the x variable in the previous post.
I just discovered the edit button. i won't post no more twice per answer.

bibiki 18 Posting Whiz

use this for generating a random integer between 104 qand 108:

x = (int)(Math.random()*4) + 104;

explanation: the Math.randon() generates a number between 0 and one (including 0 excluding 1). when you multiply the rezult by four, you get any number between zero (inclusive) and four (exclusive). Add to that 1004, and you get a number between 104 and 108. the (int) makes the random to be an int between 0 and 4.