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 8 of 8

Thread: Test

  1. #1
    Junior Member
    Join Date
    May 2014
    Posts
    14
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Test

    Hello so something is wrong with my code, I don't know whats wrong. This is the code I made http://gyazo.com/1d21ad907b5908641163495f0d7178ea but theres something wrong. I am watching a tutorial and the guy is doing exactly the same thing. The tutorial is https://www.youtube.com/watch?v=iH1xpfOBN6M . What am I doing wrong?


  2. #2
    Junior Member
    Join Date
    May 2014
    Posts
    14
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default What is wrong with my code?

    Hello so something is wrong with my code, I don't know whats wrong. This is the code I made Gyazo - 1d21ad907b5908641163495f0d7178ea.png but theres something wrong. I am watching a tutorial and the guy is doing exactly the same thing. The tutorial is https://www.youtube.com/watch?v=iH1xpfOBN6M . What am I doing wrong?

  3. #3
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,162
    Thanks
    65
    Thanked 2,725 Times in 2,675 Posts

    Default Re: Test

    Please post the code here (no links) and explain why you think there is something wrong with it. If there are error messages, copy the full text and paste it here.
    If you don't understand my answer, don't ignore it, ask a question.

  4. #4
    Junior Member
    Join Date
    May 2014
    Posts
    14
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Re: Test

    Quote Originally Posted by Norm View Post
    Please post the code here (no links) and explain why you think there is something wrong with it. If there are error messages, copy the full text and paste it here.
    package com.mime.lifeless;
     
    public class Display {
     
    	int WIDTH = 800;
    	int HEIGHT = 600;
     
    	public static void main (String[] args)
     
    }

    Beside the text there is a red circle with a white X inside of it.
    Last edited by iMiTzi; May 5th, 2014 at 12:11 PM.

  5. #5
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,162
    Thanks
    65
    Thanked 2,725 Times in 2,675 Posts

    Default Re: Test

    Sorry, I don't see the red circle.

    Can you compile the code and copy the compiler's error messages and paste it here?

    Please edit your post and wrap your code with code tags:
    [code=java]
    YOUR CODE HERE
    [/code]
    to get highlighting and preserve formatting.
    If you don't understand my answer, don't ignore it, ask a question.

  6. #6
    Junior Member
    Join Date
    May 2014
    Posts
    14
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Re: Test

    Quote Originally Posted by Norm View Post
    Sorry, I don't see the red circle.

    Can you compile the code and copy the compiler's error messages and paste it here?

    Please edit your post and wrap your code with code tags:
    [code=java]
    YOUR CODE HERE
    [/code]
    to get highlighting and preserve formatting.
    That's the error:

    Exception in thread "main" java.lang.Error: Unresolved compilation problem:
    Syntax error on token ")", { expected after this token

    at com.mime.lifeless.Display.main(Display.java:8)

    In code format:
    Exception in thread "main" java.lang.Error: Unresolved compilation problem: 
    	Syntax error on token ")", { expected after this token
     
    	at com.mime.lifeless.Display.main(Display.java:8)

  7. #7
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,162
    Thanks
    65
    Thanked 2,725 Times in 2,675 Posts

    Default Re: Test

    Syntax error on token ")", { expected after this token
    That seems very clear. What question do you have about what the compiler is saying?
    It says there should be a { after the )
    If you don't understand my answer, don't ignore it, ask a question.

  8. #8
    Junior Member
    Join Date
    May 2014
    Posts
    14
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Re: Test

    Quote Originally Posted by Norm View Post
    That seems very clear. What question do you have about what the compiler is saying?
    It says there should be a { after the )
    Thank you for your help!

Similar Threads

  1. Hi everybody i have a little test and i need to ask something
    By eyalfish in forum What's Wrong With My Code?
    Replies: 3
    Last Post: November 18th, 2013, 05:13 PM