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

  • Home
  • SEARCH
  • 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 6920869
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T10:12:13+00:00 2026-05-27T10:12:13+00:00

I read this code in a book just now. public class AdapterWrapper implements ListAdapter

  • 0

I read this code in a book just now.

public class AdapterWrapper implements ListAdapter {
  ListAdapter delegate=null;

  // other code

}

The ListAdapter is a public interface and a reference of that interface has been made and assigned null. Is this valid? I’m really confused by this.

  • 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-05-27T10:12:13+00:00Added an answer on May 27, 2026 at 10:12 am

    Yes, it’s valid. It just means that delegate is a reference to ListAdapter interface and it’s currently pointing at null.

    You can later make it point to any class implementing the ListAdapter interface, such as SimpleCursorAdapter, WrapperListAdapter or any other implementation you want.

    Using an interface type as reference is useful when you don’t know ahead of time what class is it going to be at runtime. So you just use a reference pointing to an interface.

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

Sidebar

Related Questions

Yesterday I read some code of a colleague and came across this: class a_class
I've read this question mentioning Code Bubbles and I've watched their video presentation. The
I copied this code from an example . I've read it 100 times. Array.prototype.map
Ignoring unsafe code, .NET cannot have memory leaks. I've read this endlessly from many
I usually do not have difficulty to read JavaScript code but for this one
I am curious to know why this is happening. Please read the code example
I've read the whole Dragon Book recently (just for fun, I'm not really planning
I've just started learning how to use pygame yesterday. I was read this one
$info['schedule'] = array('swimming', 'soccer', 'read book'); Just going through a tutorial and came across
Ok, so I've decided to read a little c++ now and then, just to

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.