0

Hello friends,

I am new to java and enum use. Actually I need to give only 3 options to customer for Payment Type. So i thought of using enum and making the limited members of Payment

enum PaymentType 
{
CHEQUE,
CREDITCARD,
CASH
};

public void Customer(String name, PaymentType paymentType)
{
//select which paymentType he opted
}

but i dont know how to implement enum for making option like that. please can anyone guide me.

2
Contributors
3
Replies
4
Views
6 Years
Discussion Span
Last Post by quuba
0

But how do i pass PaymentType argument When there's no object is created.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.