Posts
 
Reputation
Joined
Last Seen
Ranked #439
Strength to Increase Rep
+4
Strength to Decrease Rep
-1
66% Quality Score
Upvotes Received
3
Posts with Upvotes
3
Upvoting Members
3
Downvotes Received
2
Posts with Downvotes
1
Downvoting Members
2
4 Commented Posts
0 Endorsements
Ranked #3K
~4K People Reached
About Me

I'm a student/musician (mainly drums)/tech obsessor.

Interests
Music, games, martial arts, fast things
Favorite Forums
Favorite Tags
java x 24
Member Avatar for loozax

I just wrote this for something else, so here you go. [code=java] public class reverse { public static String reverseIt(String a) { int length = a.length(); StringBuilder reverse = new StringBuilder(); for(int i = length; i > 0; --i) { char result = a.charAt(i-1); reverse.append(result); } return reverse.toString(); } } …

Member Avatar for JamesCherrill
0
701
Member Avatar for loozax

There are a couple of problems, the biggest being that you didn't create the method ReverseIt. Also, you had a few syntax errors. Make sure you check everything over thoroughly. [code=java] public class reverse { public static String reverseIt(String a) { int length = a.length(); StringBuilder reverse = new StringBuilder(); …

Member Avatar for amitrail
0
120
Member Avatar for ganesh5155

[QUOTE=ganesh5155;943426]hi all i need ur help to solve this problem 1. write an algorithm to find the average of there number called a,b,c 2. write an algorithm to add up all odd numbers between 0 and 100 3. what data type for (i) True ] if data type for 123 …

Member Avatar for ganesh5155
0
135
Member Avatar for loozax

You need to tell us more. Do you want the program to be able to multiply out values for you and store them or do you just want it to be a container for values that you decide? And try to do it first. There are plenty of tutorials out …

Member Avatar for Godstryke
0
188
Member Avatar for loozax

Identify what the program needs to do very specifically. [LIST] [*]Prompt the user to input a String [*]Separate the String into separate characters [*]Identify the case of each letter [*]Tally up the number of each type of character [*]Ignore the characters that aren't letters [*]Display the final tally [/LIST] Briefly …

Member Avatar for Godstryke
0
188
Member Avatar for ahoyikisoba

[url]http://developer.sonyericsson.com/site/global/docstools/java/p_java.jsp[/url] There you go.

Member Avatar for ahoyikisoba
0
201
Member Avatar for loozax

Let's say X is your number. If X is even, then it must be divisible by 2 OR it's equal to zero. If it isn't then it's not even. You would use something along these lines to determine whether or not your number is even. In this, X is the …

Member Avatar for loozax
0
236
Member Avatar for MonicaClare

Here you go. It's a bit rough, but it does what you wanted. The main reason it's tough to understand is because you didn't split all your code into separate methods. If you had defined different things using individual methods and then strung it all together in main then everything …

Member Avatar for Godstryke
0
208
Member Avatar for onindita

Outline what you need to do first. Raise a few questions and answer them. You need to address a few things: [LIST] [*]Identify which parts of the input string are words and which are not and bypass the ones that are not. [*]Separate each word - how would you identify …

Member Avatar for KirkPatrick
0
148
Member Avatar for lightner

From the Sun website: [QUOTE] sort public static <T> void sort(T[] a, Comparator<? super T> c) Sorts the specified array of objects according to the order induced by the specified comparator. All elements in the array must be mutually comparable by the specified comparator (that is, c.compare(e1, e2) must not …

Member Avatar for Godstryke
0
137
Member Avatar for enyeahgo

If you're just learning it and have no real programming experience beforehand then of course it's difficult.

Member Avatar for JamesCherrill
0
133
Member Avatar for Godstryke

Hi all, I'm a student learning Java right now, so I'm still very new to what Java can do. I've written a program to perform a word count (thanks to VernonDozier for help with case-sensitivity) but another problem has come up. The program is identifying words with punctuation to be …

Member Avatar for Godstryke
0
189
Member Avatar for Godstryke

Hi all, I'm currently learning Java right now through a class and my instructor has asked me to try writing a word-count program using a Map interface. It should run through command line and has to identify the number of words, the number of distinct words, and the distinct words …

Member Avatar for Godstryke
0
1K
Member Avatar for Web_Sailor

[QUOTE=Web_Sailor;933901] //Then I am setting the value of mystring in other method like this:- public void Method2(){ Class1 wow = new Class1(); wow.mymethod(); wow.mystring = somevalueInThisMethod; } } [/QUOTE] Well, you've created three methods. The first method, "mymethod", is relatively useless. You could declare and initialize mystring straight from the …

Member Avatar for Godstryke
0
93