Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8387317
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T18:10:39+00:00 2026-06-09T18:10:39+00:00

I am a newbie and I have covered all the basic concepts of Java.

  • 0

I am a newbie and I have covered all the basic concepts of Java. Till now, I have come across examples where object references are created using Object class and using the “.class” syntax.

I tried searching for explanation on how these 2 concepts are used and I am not getting a clear picture.

All I see is, yes we can create a reference to Object. But how/what is this reference used for?

And for .class syntax, I keep seeing the term ‘Reflection’ but what really happens when I use this syntax on an exsting class like existingclass.class? And is it just to use the methods/data with in the <existingclass> without creating an instance/object?

Examples would be appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T18:10:40+00:00Added an answer on June 9, 2026 at 6:10 pm
    1. A reference to Object can point to any object; it can point to different kinds of objects at different times. It’s a good parameter type for a method when you want to pass in any kind of object, and it’s a good return type when you want to be able to return any kind of object.

    2. The notation ClassName.class returns an instance of java.lang.Class which represents ClassName. For every class loaded in the Java virtual machine, there is a java.lang.Class object to represent that class. As to what it’s good for — it’s only good for fairly advanced, magical stuff like writing code that asks what methods a class has, or creating an instance of a class when all you have is the name of the class typed in by a user or read from a file.

      Also, when you learn about threads, you’ll see that the class object has a special purpose wih respect to static methods; this need not concern you now. As a beginning Java programmer, you’ll have no need to use it; someday, though, you may.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm a bit of a NuGet newbie and have come from the Maven world.
I have a newbie question about integrating two iOS apps. I have created an
I have very newbie question. How can i check that object of model is
I am a newbie and have some question on using jdbc with java: What
I have a newbie question for writing makefile for java in Linux I have
I'm a complete C# newbie and have been trying to crack this for a
I have a newbie WPF question. Imagine my user control has a namespace declaration
I have a newbie question regarding when to release the elements of a NSArray.
Im newbie here.I have a problem with codeigniter segment() method.I referred 6th segment of
ASP.NET newbie here I have coded up an ASP.NET website and running on win'08

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.