Added brackets, to no obvious effect. I think the method works fine, it's just not being applied.
Type: Posts; User: import.Snupas
Added brackets, to no obvious effect. I think the method works fine, it's just 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...
Thanks mate. It's getting a bit clearer now :)
"cannot find symbol
symbol: class out
location: class System
<identifier> expected
illegal start of type "
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...
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
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.
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...
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;
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...
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...
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...
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....
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...
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.
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...
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...
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.
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,...
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...