T Walsh

Greenhorn
+ Follow
since Nov 22, 2012
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by T Walsh

Even though i am still learning i will give this a go

You have declared an array of a fixed size and now you need to add elements to it, for example;

position[0] = ("President");
name[0] = ("Shubham Mathur");
address[0] = ("Kakadeo Kanpur");

And then print it by doing,

System.out.println("Ist position = " +position[0]);
System.out.println("Name = " +name[0]);
System.out.println("Address = " +address[0]);

Not sure if this is what you are looking for but i said i would at least attempt it
10 years ago
Hello all, I have a question about ActionListeners, my application class entends from JFrame and implements ActionListener so it has a actionPerformed method within that class.

So can i get access to that actionPerformed method in a different class? and if so how?

Kind Regards

Tim
11 years ago
Hi all, not sure if this is the right section or not, but what book/s would you recommend for learning Java File handling and Swing?.
I don't mind if the book is useless in every other aspect it covers, as i have 2 other books that are good in most things, but really suck in File Handling and Swing package could be explained better.

Regards
Tim
11 years ago
Thanks for all your help guys, I understand why, where and when to use it now.
11 years ago
I see what your saying and thanks for the reply, but wouldn't it be easier to just use a if statement so that when the
workers tries to buy something and does not have enough money, you can return a message through the if statement
saying "Not enough money to purchase this sandwich" or whatever, if you get me.

For example if you were searching for a person through his ID number, would that be a situation where i could create a custom exception class that will
throw an exception if the user was to enter a character instead of a number?
11 years ago
Hi guys, I have a question about creating custom exception classes,
if your application is error free by using try and catches, what is the need to create exception classes?
I ask this because my application is working great now, but i was told to create a couple of custom exceptions,
and i am finding it hard to understand why i need them now, and where to use them.

If anybody maybe has some examples of where they used some before to help me get a better understanding of this
would be highly appreciated.

Regards
Tim
11 years ago
Ok won't happen again, sorry.
11 years ago
Great advice Janardan, i know what to do with it now.

Regards
Tim
11 years ago
Hi guys i am relatively new to java and i don't know how to solve this problem.
I have a list of Athletes and Coaches and if i want to remove any from the list it works,
but the problem is if a Coach has Athletes registered to him and i want to remove that Coach i also want
the Athletes registered with that Coach to be removed also.
I think the problem could be fixed with some nested if statements but i just need to be helped in the right direction.

This is my Remove Person Method, Any help will be highly appreciated.

11 years ago