Results 1 to 3 of 3
  1. #1
    Pojahn_M's Avatar
    Pojahn_M is offline Senior Member
    Join Date
    Mar 2011
    Location
    Sweden
    Posts
    200
    Rep Power
    10

    Default Cant compile this simple line!

    This line wont compile for some reason:
    Java Code:
    String tempString = theFile[z].toString ().replace (tempChar, key[v][[100 * (int) Math.random()]);
    Java Code:
    C:\Program\Java\jdk1.6.0_23\jre\classes\pjjava\crypt\cryptMethods.java:170: illegal start of expression
    				String tempString = theFile[z].toString ().replace (tempChar, key[v][[100 * (int) Math.random()]);
    				                                                                     ^
    C:\Program\Java\jdk1.6.0_23\jre\classes\pjjava\crypt\cryptMethods.java:170: ')' expected
    				String tempString = theFile[z].toString ().replace (tempChar, key[v][[100 * (int) Math.random()]);
    				                                                                      ^
    C:\Program\Java\jdk1.6.0_23\jre\classes\pjjava\crypt\cryptMethods.java:170: ';' expected
    				String tempString = theFile[z].toString ().replace (tempChar, key[v][[100 * (int) Math.random()]);
    				                                                                                               ^
    3 errors
    
    Tool completed with exit code 1
    PHP Code:
    		for (int z = 0; z < theFile.length; z++)
    		{
    			for (int v = 0; v < theChars.length; v++) //Här har vi inte theChars.length + 2 eftersom dom används senare
    			{
    				String tempChar = theChars[v] + "";
    				String tempString = theFile[z].toString ().replace (tempChar, key[v][[100 * (int) Math.random()]);
    				theFile[z] = new StringBuilder (tempString);
    			}
    		}

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    13,541
    Rep Power
    26

    Default

    Why have you got two '[' next to each other?

  3. #3
    Pojahn_M's Avatar
    Pojahn_M is offline Senior Member
    Join Date
    Mar 2011
    Location
    Sweden
    Posts
    200
    Rep Power
    10

Similar Threads

  1. 30 line simple gui, simple error, need help
    By cc11rocks in forum New To Java
    Replies: 6
    Last Post: 02-05-2011, 08:33 PM
  2. Replies: 4
    Last Post: 01-04-2011, 12:36 AM
  3. Replies: 3
    Last Post: 08-25-2010, 10:21 AM
  4. [SOLVED] Compile from the command line
    By GilaMonster in forum New To Java
    Replies: 8
    Last Post: 06-13-2008, 07:12 AM
  5. simple problem - code wont compile
    By dirtycash in forum New To Java
    Replies: 1
    Last Post: 11-20-2007, 05:49 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •