This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Java in General and the fly likes Please Help me out... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Java in General
Reply locked New topic

Please Help me out...

RamaKrishna Ravuri

Joined: May 13, 2007
Posts: 4
I have two main methods like this...

public class MyClass{

public static void main(String []args){
System.out.println("In String");

public static void main(Character []args){
System.out.println("In Character");

Now I want to run this the following output
In Character then In String....

How is this possible...

Anupam Sinha
Ranch Hand

Joined: Apr 13, 2003
Posts: 1088
A Duplicate of this.
David O'Meara

Joined: Mar 06, 2001
Posts: 13459

Please Help me out... is not a useful topic, please help us to help you.

Java only provides a single execution point for a class. You can put them in two different classes, but the (Character []args) version will never be called, only the String version.
I agree. Here's the link:
subject: Please Help me out...