Results 1 to 2 of 2
  1. #1
    Jaguar1998 is offline Member
    Join Date
    Apr 2010
    Posts
    13
    Rep Power
    0

    Default Update New to Java

    Okay last time I posted I copied and pasted my code and it ended up being because I had a false statement in it.

    This is for a Soduku randomizer. I have been trying to figure out what or how to put in the right syntax to make my current soduku puzzle be a vaild soduku puzzle.

    the fallowing is code and if there is any way to make it easier for you to read please let me know.

    private void initGame()
    {
    Random r = new Random( 9 );
    for (int i = 0; i < 9; i++)
    {
    for (int j = 0; j < 9; j++)
    {
    int randomValue = r.nextInt( 9 ) + 1;
    if (IsValid( i, j, randomValue ))
    {
    cells[i][j].setText( String.valueOf( randomValue ) );
    } else
    {
    j--;
    }
    }
    }
    }
    private boolean IsValid( int row, int column, int value )
    {
    System.out.println( "Checking " + row + " " + column + " for " + value );
    {
    {
    return true;
    }
    }}}

    Also could anybody refer me to good books that will help me understand Java better with being a newbie I love learning the language just would like to get to know java like it was a second language.

    Thanks again everyone.:)

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

Similar Threads

  1. JMX update of Java 1.6.0_13
    By twinks in forum Advanced Java
    Replies: 0
    Last Post: 10-07-2009, 03:13 PM
  2. Can't Install Java JRE 6 Update 13 (using IE 8)
    By bizadi in forum New To Java
    Replies: 12
    Last Post: 04-03-2009, 05:39 PM
  3. Java Update Installation
    By guest in forum New To Java
    Replies: 1
    Last Post: 12-01-2007, 05:36 AM
  4. Java Crashes on Mac 10.3.9 not sure how to update
    By patricknowow in forum New To Java
    Replies: 1
    Last Post: 11-30-2007, 04:57 AM
  5. Java SE 6, Update 1 released
    By derrickD in forum Java Software
    Replies: 1
    Last Post: 05-06-2007, 07:46 AM

Posting Permissions

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