Search:

Type: Posts; User: pbrockway2

Search: Search took 0.13 seconds.

  1. Replies
    4
    Views
    1,341

    Re: How to convert two elements into one

    That's what setter methods are for. Your Card class would have an instance variable like isUp or whatever, and a setter method:



    public class Card {
    private boolean isUp = false;

    ...
  2. Replies
    4
    Views
    1,341

    Re: How to convert two elements into one

    It sounds like the upness is a property of a card. Consider modelling this by writing a Card class whose toString() or some other method produces the desired string.

    One consequence of this...
Results 1 to 2 of 2