This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Help me put this into a method..

 
mike bones
Greenhorn
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello.

I'm a new java programmer trying to convert this prog into a method. What the prog does is converts a string to uppercase.

Code:

public class CaseChange
{
public static void main (String[] args)
{
String TestString = new String("Test String");

TestString = TestString.toUpperCase();
System.out.println("UPPER CASE " + TestString);

}
}


Can anyone help me convert this into a method? So that I can call it in the main?

Any help would be great.

=]
 
pete stein
Bartender
Posts: 1561
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not exactly sure what you want as I think that there are several ways to do what I think you desire.

using static methods:



or using classes:



ps: please learn about code tags so that your code is more readable.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic