Is this correct?

What Java object type would abstract the number of apples to?

The context: An apple or another real-world object can be abstracted into a specific object in the Java programming language. I am trying to ask the other person what Java object type they would use abstract to.

2 Answers 2


Grammatically speaking - the verb needs a subject.

What Java object type would you abstract the number of apples to?

Alternatively you can put it in the passive voice:

What Java object type would the number of apples be abstracted to?

On more of a technical level, I probably wouldn't use abstract for assigning a simple count of the number of objects, only when there is more indirection at play. But I assume this is just a simplified example for the sake of the English question, and the real situation is a more complex refactoring.


To expand on stevekeiretsu's answer, "abstract" needs a subject, and with your current wording, the only one available is the interrogative pronoun "what". That leaves "to" without an object.

And you're a bit ambiguous whether you're abstracting the number of apples or the apples themselves. The former can be handled just with the existing object type of integer.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .