Moe Kennedy

Greenhorn
+ Follow
since Aug 29, 2011
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
1
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Moe Kennedy

Solution without an if:
7 years ago
Hi

Im trying to navigate on a website with Java.
I dont want to get the HTML-page, I need to fill out some input-fields and then click a submit button.

Thanks for any advice.
8 years ago

Paul Clapham wrote:That message says that your "public static void main" method shouldn't be inside that nested class. Move it out of there so that it's a method of SimpleChatServer.



Thank you :thumbup:
9 years ago
Hi

Paul Clapham wrote:Let's start at the beginning: how can you tell it isn't working?



When I try to run one of these files, an error appears:

Exception in thread "main" java.lang.Error: Unresolved compilation problem:
The method main cannot be declared static; static methods can only be declared in a static or top level type

at server.SimpleChatServer$ClientHandler.main(SimpleChatServer.java:40)
9 years ago
Hello
I'm trying to make a small chat programm. It should not be perfect. ;-)

Here is the code I have already, unfortunately it is not working.
This is the Server:


This is the client:


Would be nice if someone coud help me.
9 years ago
Here is the code from the class dog:


This is the test1:

That works fine. But now I have to get the name from the dog1. But I'm in another class.
I tried this, but it wont work:

9 years ago
Hello
Im trying to use an object in an other class.
Example:

That works fine. But in an other Class I have to get the name of the object dog1. How can I do that?
"dog1.getName" of course doesn't work...

Greetings From Switzerland
9 years ago