DeadTheory23's Profile User Rating: -----

Reputation: 0 Apprentice
Group:
Members
Active Posts:
26 (0.03 per day)
Joined:
16-September 12
Profile Views:
237
Last Active:
User is offline Apr 27 2013 09:48 PM
Currently:
Offline

Previous Fields

Country:
US
OS Preference:
Mac
Favorite Browser:
Safari
Favorite Processor:
Intel
Favorite Gaming Platform:
XBox
Your Car:
Suzuki
Dream Kudos:
0
Icon   DeadTheory23 has not set their status

Posts I've Made

  1. In Topic: The method is undefined for type string?

    Posted 18 Apr 2013

    View PostMaynia, on 18 April 2013 - 03:54 PM, said:

    You're trying to call the method setByteToThisString() on a String variable, that you've named 'junk'. The compiler is telling you exactly what you need to know here - there is no method defined on Strings by that name. Perhaps you meant to call it on a different variable? I will admit I'm having difficulty seeing what this code is actually doing overall.


    Thank you for the reply, and My apologies, I know the code is incomplete, but in short its an assignment for my java class. Our prof gave us his code for one program and told us to edit it to make it do the following: Use a grid layout to display the labels, jtextfields, and buttons, and make it so that when the button is pressed by a jtextfield it takes the number in it, adds it to the number in the next box, and display it there. Its an exercise with focus, grid layouts, and a little extra. I've got the first 2 parts down but am drawing a blank for the final part :(
  2. In Topic: Cannot find symbol error?

    Posted 26 Mar 2013

    My apologies to any one reading this. terrible mishap on my side and i have realized I left a few lines of code out.
  3. In Topic: Set method not accepting parameters?

    Posted 18 Feb 2013

    View PostRyano121, on 18 February 2013 - 02:33 PM, said:

    I think you were meaning to do

    demo.setBrandToThisBrand(new FoodV4("something", "something"));
    


    You need to construct another object of FoodV4 and pass that into the method.


    Ahh yes I see what I needed to do there. Basically just a formatting issue. Thanks for the reply though. It is much appreciated!

    View Postpbl, on 18 February 2013 - 02:35 PM, said:

    demo.setBrandToThisBrand(FoodV4 anotherFoodItem);

    when you call a method, you do not specify the parameter tyope so should be

    demo.setBrandToThisBrand(anotherFoodItem);

    assuming that anotherFoodItem is a FoodV4 object which is not the case, it is a String

    but if you do

    FoodV4 f4 = new FoodV4("xxx", "yyyyy");
    demo.setBrandToThisBrand(f4);

    it should work


    Thank you for the detailed reply! I appreciate the insight!
  4. In Topic: Test Program syntax issue

    Posted 12 Feb 2013

    View Postraghav.naganathan, on 12 February 2013 - 01:48 AM, said:

    I have a feeling that is happening because you are calling the function without providing a value to anotherFoodItem

    regards,
    Raghav

    Thanks for the reply, and where would I provide one? You can't put a string or a cast to FoodV4 in demo.setBrandToThisBrand(FoodV4 anotherFoodItem); without getting errors. I'm a bit confused by this.
  5. In Topic: Test Program syntax issue

    Posted 11 Feb 2013

    View Postraghav.naganathan, on 11 February 2013 - 11:28 PM, said:

    Can you please post the exact errors that you are getting?

    regards,
    Raghav

    The output I get when running the test program is"
    Exception in thread "main" java.lang.Error: Unresolved compilation problems:
    FoodV4 cannot be resolved to a variable
    Syntax error on token "anotherFoodItem", delete this token

    at TestFoodV4.main(TestFoodV4.java:13)
    "

My Information

Member Title:
New D.I.C Head
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:

Contact Information

E-mail:
Private

Friends

DeadTheory23 hasn't added any friends yet.

Comments

DeadTheory23 has no profile comments yet. Why not say hello?