Search:

Type: Posts; User: helloworld922

Search: Search took 0.12 seconds.

  1. Replies
    9
    Views
    6,914

    Re: connecting two classes?

    Yes, design a class for a purpose. However, that purpose may have many functions (and uses). One of the key elements of Java is to not re-design something when it works great, especially if all...
  2. Replies
    9
    Views
    6,914

    Re: connecting two classes?

    ...

    Copy paste, and change the class name. Like I said, not very useful.


    public class ReverseString1
    {
    String txt;
    public ReverseString(String str)
    {
  3. Replies
    9
    Views
    6,914

    Re: connecting two classes?

    Oh, it's definately possible. The question is why would you want to do that? In essence, you're creating two different identical classes :)) Not too many uses I can think of for that.
  4. Replies
    9
    Views
    6,914

    Re: connecting two classes?

    ??? That makes no sense. If you want to reverse a string, you don't need two classes to do it. Simply have your first class reverse itself:


    public class ReverseString
    {
    String txt;
    ...
Results 1 to 4 of 4