This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I am trying to create a class method that takes a string and returns an array of integers, maybe alphabetical letters and should include upper and lower cases, could anyone give me any ideas, this is my firs java class [ December 15, 2004: Message edited by: Kenedy Grifin ]
You might as well bookmark the link to the Java API: Java API
If you look under String, you will find a method that I think you will see could be very helpful to you called toCharArray()
The java API is your friend. When I need to to something that I don't know how to do in java, I usually go to the API and search around to see if I can find something useful there. Nine times out of ten there is a class or method in the API that I can use. This is also a great way to learn. Hope this helps.
If this is your first Java class, this question would probably be more appropriate in the Java in General (beginner) forum. Also, you haven't provided enough information for us to help you very much. What exactly does this method do? How does it create the integer array from the String that is passed as a parameter?
Even before you start figuring that out, you should probably work on the syntax for creating a class and declaring a method inside of it. Have you done this much yet? If so, does your code compile? What problems have you encountered? Is there any part of the sytnax you understand?
Hopefully these questions will help you think about what you need to do to write this program. Please come back with specific questions about what you are trying to do. The more information you can provide about your particular problem, the better we can help you figure out a solution to it.