• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 41
  • Last Modified:

JAVA Question: which is the Object and which is the Class?

In this photo, which section of the code would be the Object and Class. If there are multiple objects/classes, please list them all.
  • 2
1 Solution
Guy Hengel [angelIII / a3]Billing EngineerCommented:
we are not answering homework questions like this.
but post what you think what objects you find and we can comment on that
rgb192Author Commented:
lynda.com. I am self learning. So this is my homework, not school homework
Guy Hengel [angelIII / a3]Billing EngineerCommented:
it does not change anything
if we post the plain answers, there is no learning effort done by you.
try to find what a class is and what an object is.
using those definitions, look at the code and it should become easy.
Well I think it's fair to help get you started:

WeatherService ws = new MockWeatherService() ;

Open in new window

In that statement, "MockWeatherService" is the name of a Class.
"WeatherService" is a type - which can be either the name of a class or the name of an interface.
"ws" is an instance of that class and so "ws" is an object.

Does that help?  Can you try to follow that pattern for the rest of the file?

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now