Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to make this Possible..Pls help

 
RamaKrishna Ravuri
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
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 ..like...
In Character then In String....

How is this possible...

Regards,
RV
 
Anupam Sinha
Ranch Hand
Posts: 1090
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Or do you want to do it using threads?
 
Nicholas Jordan
Ranch Hand
Posts: 1282
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
[ 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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic