Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Cesar Gonzalez   on Mar 01 In Java Category.

  
Question Answered By: Vidhya Iyer   on Mar 01

If your object  has two properties, a String property and a primitive
int property than you need a way to retrieve those properties. You
need getters. Normally, when you write the class file for the object
class you would write the getter method  there. Write now you are
trying to cast  the entire object as an Integer which will produce
undesired results,

Share: 

 

This Question has 6 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on How Do I Cast Object To Int ? Or get search suggestion and latest updates.


Tagged: