Jam Rei

Greenhorn
+ Follow
since Aug 19, 2013
Jam likes ...
IntelliJ IDE Java Mac
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Jam Rei

Java source code is case sensitive, i.e. While is not the same as while.
You can use While, because it's not a keyword in java, but while is a keyword.
3 years ago
Sorry guys,

"java.lang.OutOfMemoryError" is result of Copy / Paste. It have to be Integer Out Of Range .

LONGT is written with capital letters in order to achieve greater emphasis on the data type.

... You cannot declare the number as a long there, and it is long not LONG. ...

3 years ago
Integer.MAX_VALUE = 2147483647 and if you try to use integer numbers greater than 2147483647 you receive java.lang.OutOfMemoryError.
To avoid errors, you must declare the variable as LONG.

3 years ago
Congratulations Everyone!
5 years ago
Congratulations Ranchers!
5 years ago
2. A reference is a variable ,so it can be reassigned to other objects (unless the reference is declared final)

Example:
final Person MY_BOSS = new Person();
Person person = MY_BOSS;
Person otherPerson = MY_BOSS;


5 years ago
Test the input value (x <= 0 && x > 9) before the for loops
5 years ago

if the store the words below "if(sentence.charAt(i) == ' ')" the output comes "T. . . ."


try with other delimiters, such as _ and you can see that each word begins with this delimiter

To see that do the following steps:
1. Comment out line 28 //word += sentence.charAt(i);
2. Change a line 30 to if(sentence.charAt(i) == '_')
3. Comment in line 37 //word += sentence.charAt(i);
4. Add a new line 38: System.out.println("iteration: " + i + " word: " + word);
5. Run the program and enter a sentence suppose This_is_a_cat

Hint: Clean your code, e.g. write line 25: for(int i = 0; i < sentence.length(); i++) and delete lines 20 and 23, etc...
5 years ago
You can use html parser library, like SyberNeko HTML Parser or HtmlCleaner
5 years ago
First you need to remove the keyword class from the constructor in line 15 and second classname and constructor name must be the same.
5 years ago
Hint: Start to write your algorithm out in pseudocode before coding.
5 years ago
Another approach is to use regular expressions. Regex Tutorial
5 years ago
algorithm tips:
you don't need any numbers >= 50 and numbers < 60
you don't need number 5 and any other number that has 5 at the end
5 years ago
5 years ago