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

Thread: help noob with no clue what this error is (can't compile)

  1. #1
    Junior Member
    Join Date
    Feb 2014
    Posts
    1
    My Mood
    Confused
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default help noob with no clue what this error is (can't compile)

    [ATTACH=CONFIG]27j.jpg49[/ATTACH]Hello,
    I am wondering if anyone can help me, I'm having the hardest time getting a program to compile. I'm beginning to think I've downloaded the incorrect version of turtle graphics. This symbol looks foreign and I'm unsure how to find a solution. I have fixed some of the errors since this last picture but I will write out my code. The program takes a photo and converts to gray scale then to sepia

    import images.APImages;
    import images.Pixel;
    import java.util.Scanner;

    public class sepia{

    public static void main(String [] args){

    Scanner reader = new Scanner(System.in);
    System.out.print("Enter image file name to continue: ");
    String fileName = reader.nextLine();
    APImages theOriginal = new APImages(fileName);
    theOriginal.draw();
    int width = theOriginal.getWidth();
    int height = theOriginal/getHeight();
    APImages numba2 = theOriginal.clone();
    numba2.draw();
    Pixel oldPixel = theOriginal.getPixel(x, y);
    Pixel rightPixel = theOriginal.getPixel(x, y - 1);
    Pixel bottomPixel = theOriginal(x - 1, y);
    int red = numba2.getRed(average);
    int green = numba2.getGreen(average);
    int blue = numba2.getBlue(average);
    int average = ( red + green + blue)/3;
    for(int y = 0; y < height; y++)
    for(int x = 1; x < width; x++){
    if(red < 63){
    red = (int)(red * 1.1);
    blue = (int)(blue * 0.9);
    }
    else if(red < 192){
    red = (int)(red * 1.15);
    blue = (int)(blue * 0.85);
    }
    else{
    red = Math.min(int(red * 1.08), 255);
    blue = (int)(blue * 0.93);
    }
    }
    }

    //end main

    So any feedback any criticism is better then none whatsoever. I wouldn't normally ask but I have had very little success finding little to no java tutorials usually just python and c++.


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    22,310
    Thanks
    56
    Thanked 2,373 Times in 2,344 Posts

    Default Re: help noob with no clue what this error is (can't compile)

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

    Also copy the full text of the error messages and paste it here.
    If you don't understand my answer, don't ignore it, ask a question.

  3. #3
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    6,304
    My Mood
    Mellow
    Thanks
    252
    Thanked 778 Times in 763 Posts

    Default Re: help noob with no clue what this error is (can't compile)

    Welcome to the forum! Please read this topic to learn how to post code in code or highlight tags and other useful info for new members.

Similar Threads

  1. Replies: 3
    Last Post: November 30th, 2013, 05:52 PM
  2. DB application error, who has a clue what it is about?
    By willemjar in forum JDBC & Databases
    Replies: 4
    Last Post: September 3rd, 2013, 07:34 AM
  3. compile error
    By silverpen10 in forum What's Wrong With My Code?
    Replies: 22
    Last Post: January 12th, 2013, 11:15 AM
  4. Error while compile
    By when im gone in forum What's Wrong With My Code?
    Replies: 3
    Last Post: January 7th, 2012, 10:53 AM
  5. Compile Error, tried everything please help
    By cdub0 in forum What's Wrong With My Code?
    Replies: 2
    Last Post: May 17th, 2011, 04:31 AM

Tags for this Thread