Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 5 of 5

Thread: i feel like a retard! Java noob

  1. #1
    Junior Member
    Join Date
    Nov 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default i feel like a retard! Java noob

    I´ve been learning java for a week, yesterday while on bed, couldnt sleep i tought to myself, it would be a good excercise if i made a program where i would input the side of a square, then make the square representation.

    Anyway i tought i would do this like in 10m, i spent 3hours till i got it right, feel a complete retard and my motivation is damm low right now.


     
    import java.util.Scanner;
     
    public class quadrado {
     
    	public static void main(String[] args) {
     
     
    		Scanner input = new Scanner(System.in);
    		int quadrado;
    		System.out.println("Insert Square Size");
    		quadrado = input.nextInt();
     
    		int counter = 1;
    		int total=1;
     
     
    		while(counter<quadrado){
     
    			counter++;	
    			total++;
     
     
    			System.out.print("O   ");
     
     
     
    		if(counter==quadrado){
     
    			System.out.println("O   ");
    			if((total)==(Math.pow(quadrado, 2))){break;}
     
    			counter=1;
    			total++;
    		}
    		}
    	}
    }


  2. #2
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,237
    Thanks
    176
    Thanked 817 Times in 760 Posts
    Blog Entries
    5

    Default Re: i feel like a retard! Java noob

    As a specific question, get a specific answer. Ask no question, get no answer.

    This thread has been cross posted here:

    http://www.java-forums.org/new-java/64840-i-feel-like-retard-java-noob.html

    Although cross posting is allowed, for everyone's benefit, please read:

    Java Programming Forums Cross Posting Rules

    The Problems With Cross Posting


  3. #3
    Super Moderator jps's Avatar
    Join Date
    Jul 2012
    Posts
    2,642
    My Mood
    Daring
    Thanks
    90
    Thanked 263 Times in 232 Posts

    Default Re: i feel like a retard! Java noob

    Learning for only a week?
    Thinking about programming in your spare time?
    Curious enough to write a program just because you think you can?
    So you actually do it...and in only 3 hours...
    Does it work?
    ..If every beginner had your problems, schools would not exist..


    I entered 0, and nothing was printed as I expect.
    I was not happy with entering 1, I expected to see a single zero printed instead of nothing
    Other + integers worked as expected.

    Pat yourself on the back for a job well done.

    Perhaps troubleshoot and fix the code so that entering 1 will cause it to print a square of size 1 (a single zero).
    Try to write the program a different way but make it do the same thing.
    Modify the code so you can enter any letter of choice to build the square from instead of always 0.

  4. #4
    Junior Member
    Join Date
    Nov 2012
    Location
    Windsor, Ontario
    Posts
    9
    My Mood
    Bored
    Thanks
    0
    Thanked 1 Time in 1 Post

  5. #5
    Junior Member
    Join Date
    Nov 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: i feel like a retard! Java noob

    thanks for the reply´s guys , so far i had learned seeing youtube bucky java tutorial´s which i thought were great, now ive picked java how to program book from deitel, it was a eye opener!! Everything explained in detail how it should really be.

Similar Threads

  1. Java Noob needs help!
    By antares330 in forum What's Wrong With My Code?
    Replies: 3
    Last Post: September 24th, 2012, 09:03 AM
  2. Help im a java noob!
    By jonathanfox in forum Collections and Generics
    Replies: 11
    Last Post: July 26th, 2012, 06:04 AM
  3. >>> Java Noob here <<<
    By Kikiam in forum Member Introductions
    Replies: 2
    Last Post: March 19th, 2012, 09:48 AM
  4. Please help! Noob java user here
    By New Guy_5 in forum Loops & Control Statements
    Replies: 3
    Last Post: November 14th, 2011, 08:44 PM
  5. Keep it simple for the retard- Outputting audio on a trigger.
    By andypooz in forum What's Wrong With My Code?
    Replies: 0
    Last Post: April 17th, 2010, 08:14 AM