No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
[CODE]public class Tokenizer{ public static void main(String args[]){ String Arr[] = new String[20]; Scanner scan = new Scanner(System.in); System.out.println("Enter a String: "); String st = scan.nextLine(); Tokenizer tk = new Tokenizer(); tk.makeToken(st, Arr); } public void makeToken(String st, String Arr[]){ int i=0; StringTokenizer Tokens = new StringTokenizer(st); while(Tokens.hasMoreTokens()){ Arr[i]=Tokens.nextToken(); i++; … |
|
the output is supposed to be like this: [B]1 0 0 1 0 1 1 0 0 1 1 0 1 0 0 1[/B] what I have is this: [B]1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1[/B] [CODE]import java.util.*; class Array{ public … |
|
Re:
I keep getting errors saying that the scanner statement is not a statement. I am also getting more errors such as, expecting ";" on the scanner line and that my celsius statement which does the math to convert Celsius into Fahrenheit. I need help correcting these errors [CODE]import java.util.*; import … |