Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~4K People Reached
Favorite Forums
Favorite Tags
java x 15
Member Avatar for java.util

I have this try-block [CODE]try { FileReader textFileReader = new FileReader(filename); BufferedReader textReader = new BufferedReader(textFileReader); String post = textReader.readLine(); int weeknumber = Integer.valueOf(post); if (weeknumber != weeknmbr) { System.out.println("Wrong weeknumber."); return false; } post = textReader.readLine(); while (post != null) { insertPost(post); post = textReader.readLine(); } textReader.close(); }[/CODE] but …

Member Avatar for java.util
0
111
Member Avatar for java.util

Can anyone see what's wrong with this piece of code? When I try to compile I get an error on the first line (line 3) "cannot find symbol, symbol : method split(char)" I have the delimiter btw as a public static final char in the same class. [CODE]private static boolean …

Member Avatar for java.util
0
2K
Member Avatar for java.util

Hello, I have this little piece of code [CODE]System.out.println("Write a sentence: "); String sentence = tastatur.next(); String[] temp; String divider = " "; temp = sentence.split(divider);[/CODE] The problem is that when I enter a sentence only the first word gets stored in the string. For instance if I enter "dum …

Member Avatar for java.util
0
135
Member Avatar for java.util

Hello, I have written a program for an assignment and all was working well, I tested everything and all that was left was to put in a few error-messages. Then, I changed the format from ISO to utf-8 and when I tried to run it again it suddenly stops at …

Member Avatar for javaAddict
0
1K
Member Avatar for java.util

Hello, I have this code that's giving me some problems: [CODE]import java.util.Scanner; class Bæreevne{ public static void main(String[] args) { int avstand, vektTre, vektBetong; Scanner tastatur = new Scanner(System.in); System.out.print("Oppgi antall meter mellom søylene"); avstand = tastatur.nextInt(); vektTre = 3000 - 20*avstand*avstand; vektBetong = 7000 - 80*avstand*avstand; if (vektTre > …

Member Avatar for Taywin
0
146