Meaningless Drivel is fun!
The moose likes Threads and Synchronization and the fly likes How to make this Possible..Pls help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » Threads and Synchronization
Bookmark "How to make this Possible..Pls help" Watch "How to make this Possible..Pls help" New topic

How to make this Possible..Pls help

RamaKrishna Ravuri

Joined: May 13, 2007
Posts: 4
I have two main mtehods 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: 1090

Or do you want to do it using threads?
Nicholas Jordan
Ranch Hand

Joined: Sep 17, 2006
Posts: 1282
[ deleted references to an old conversation, by request of NJ - Jim ]

[Perhaps this will assist the poster: Monday, May 21, 2007 - 6:30 AM ]

Credit where credit is due: It took me more than 60 seconds +/- a few keystrokes, the constructor was on line 553 (after Public data for enumerated Unicode general category types, class Subset, class UnicodeBlock, char blockStarts[] and UnicodeBlock blocks[]) in a file:
that is unfamiliar to me in it's placement of constructors.

Correctly, class OverloadDemo would have member functions taking type String in one, type Character in the second - having two mains is not normally resolved by whether the function is a static method or an instance method, therefore we have a learning opportunity presented for me in front of 5860 visitors: It may be that the TYPE of String[] is different from String. If so, my original work here was founded on an incomplete understanding.

[ Additionally, we need some sort of templated-type instantiation in Java to avoid cluttered code from handling paramaters differently as the codebase dis-integrates on large-scale projects. It should be that the method name matches up with what the method does, to enforce encapsulation. ]

[ May 21, 2007: Message edited by: Nicholas Jordan ]
[ May 21, 2007: Message edited by: Jim Yingst ]

"The differential equations that describe dynamic interactions of power generators are similar to that of the gravitational interplay among celestial bodies, which is chaotic in nature."
I agree. Here's the link:
subject: How to make this Possible..Pls help
It's not a secret anymore!