Search:

Type: Posts; User: import.Snupas

Search: Search took 0.29 seconds.

  1. Replies
    6
    Views
    160

    Re: Method not being applied

    Added brackets, to no obvious effect. I think the method works fine, it's just not being applied.
  2. Replies
    6
    Views
    160

    Method not being applied

    Hello there, I'm doing an exercise we're you're supposed to sort strings in alphabetical order, without importing anything , aka, not using the Arrays.sort() method.

    I think I got the method down...
  3. Replies
    4
    Views
    122

    Re: Problems with Inheritance

    Thanks mate. It's getting a bit clearer now :)
  4. Replies
    4
    Views
    122

    Re: Problems with Inheritance

    "cannot find symbol
    symbol: class out
    location: class System

    <identifier> expected

    illegal start of type "
  5. Replies
    4
    Views
    122

    Problems with Inheritance

    I was experimenting with inheritance, trying to write an example for myself from scratch. For testing purposes, I wanted my child class to print something from my parent class, but what I get is...
  6. Re: Need help doing an exercise[constructors]

    Just needed to add a few } and your solution worked. I guess I'll have to research .this

    Thanks for putting up with me GState
  7. Re: Need help doing an exercise[constructors]

    Should I create new variables for each constructor then?

    Name= name;
    Age= age;

    etc. ?

    I've tried doing this.name and this.age and it didn't change a thing.
  8. Re: Need help doing an exercise[constructors]

    I don't think it's based on how I write the System.out.println statement? I corrected it to the way you wrote it and it still gives the same output.

    I could try to add accecors, but it didn't ask...
  9. Re: Need help doing an exercise[constructors]

    Thanks for the speedy response! At least in runs now. Code now looks like this:



    public class Insurance
    {
    public String name;
    public int age;
    public String insuranceTime;
  10. Need help doing an exercise[constructors]

    The exercise is:

    In your examination folder, there is a file called Insurance.java. This class includes the following list of attributes:
    name, age and insuranceTime. Modify this code by adding...
  11. Re: What do I need to learn to understand this code?

    Thanks aussie!

    You're right Greg. I just wanted to write up a laundry list of stuff I needed to catch up on, but it probably was selfish for someone to figure it out for me.

    Thanks again...
  12. Re: What do I need to learn to understand this code?

    Mock Test is essentially practice before the Lab Test. They just call it that in UK universities.

    I am now slowly realizing I know nothing about setting or returning something. What's the point of...
  13. What do I need to learn to understand this code?

    So I was a sick for some time and missed a few uni lectures and I was at a complete loss when we were supposed to do the mock test. It was based on these resources I found on our module webpage....
  14. Re: Why isn't this grade averaging working?

    I'm saving the them to int grade.

    Which I then use to add up to the total.

    This loop repeats itself until the user inputs a certain amount of numbers.

    EDIT: It's not printing anything when I...
  15. Re: Why isn't this grade averaging working?

    I can input as many numbers as I want and press return or just type in a series of numbers pressing return with each number, the program doesn't react to them.
  16. Why isn't this grade averaging working?

    I don't know if there is something wrong with my eclipse program, but nothing shows up on the console screen after I run this code(it runs without errors). All of the other codes are working...
  17. Replies
    2
    Views
    155

    Quiz program with if and else

    I'm sure there's an easier way to do this, but I was trying to make a very primitive java program that would move on if the answer was correct and would terminate if it wasn't. It works and gets to...
  18. Replies
    4
    Views
    109

    Re: IF with strings?

    Thanks a bunch, it works perfectly now.

    Eclipse likes to point out that I'm missing a semicolon but not that I need to remove one.
  19. Replies
    4
    Views
    109

    Re: IF with strings?

    Searched a few other threads, and found out that you have to use .equals() instead of == when comparing strings, but now I'm getting a syntax error with else.
    EDIT: Didn't see your post there Greg,...
  20. Replies
    4
    Views
    109

    IF with strings?[Solved]

    Hey, complete beginner programmer here, learnt about user input today and decided to mess about. All codes with integers and doubles worked perfectly, but I'm stuck with string. It shows up as...
Results 1 to 20 of 20