Calculating a payment price based on a selected phone
You have seemed to start off ok, by acknowledging that you need an object to hold the price and name of the phone.
You can separate this object's class, as others have mentioned, into another file and give it a more meaningful name (e.g. MobilePhone, Device, etc.)
Going back to the original problem, you need to calculate the final purchase price of a phone. According to your requirements, this final value might be influenced by the type of payment the user chooses (e.g Cash or Credit)
There's several ways you can approach your problem afterwards.
Example:
You can have an object that is responsible for calculating the final price of a phone based on the payment options. This might require you to create objects for the payment options as well.
(code below is missing some parts, like constructors, etc)
class PhonePriceCalculator {
    public double calcPrice(Phone phone, Cash cash) { }
    public double calcPrice(Phone phone, Credit cash) { }
}

// some classes to hold data
class Phone { }
class Cash { }
class Credit { }

Then, you just need to plug those objects in with your main() method. There are some improvements that you can make to code above.
For example, Cash is really just a type placeholder for calculating price. It never changes. Maybe you can model the Cash and Credit options through an enumeration. This will work just fine if there's only two credit types.
Another example:
Maybe modelling the price calculation through an object isn't so bad. But you didn't like the fact that we also have objects for the payment types (or an Enum if you decided to go for that instead). Well, you can simplify the price calculator by giving it a discount value instead:
class PhonePriceCalculator {
    public double calcPrice(Phone phone, double discount) { }
}

This way, this class doesn't need to know the payment type. Just the discount.
Final Considerations
I didn't touch private/public encapsulation because other users like Pimgd and Ethan Bierlien had already mentioned it. But again, it is wise to make fields inside an object private, and expose them through methods. Remember, the object is the owner of those fields. So it must choose to expose them (or not) consciously.
I know this is a toy example, but when you are dealing with money calculations in java, you're better of using the BigDecimal class instead of double. You can play with decimal scales, amongst other things.