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 8449197
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T10:38:19+00:00 2026-06-10T10:38:19+00:00

I was studying livewallpaper in this site . However something there is something that

  • 0

I was studying livewallpaper in this site. However something there is something that i dont understand.

Example in the code of the tutorial there a class named MyPoint

public class MyPoint {
  String text;
  private int x;
  private int y;

  public MyPoint(String text, int x, int y) {
    this.text = text;
    this.x = x;
    this.y = y;
  }
} 

then after he created a MyWallpaperService class. Inside of that class there is a line of code like this

 private List<MyPoint> circles;
    private Paint paint = new Paint();
    private int width;
    int height;
    private boolean visible = true;
    private int maxNumber;
    private boolean touchEnabled;

public MyWallpaperEngine() {
  SharedPreferences prefs = PreferenceManager
      .getDefaultSharedPreferences(MyWallpaperService.this);
  maxNumber = Integer
      .valueOf(prefs.getString("numberOfCircles", "4"));
  touchEnabled = prefs.getBoolean("touch", false);
  circles = new ArrayList<MyPoint>();
  paint.setAntiAlias(true);
  paint.setColor(Color.WHITE);
  paint.setStyle(Paint.Style.STROKE);
  paint.setStrokeJoin(Paint.Join.ROUND);
  paint.setStrokeWidth(10f);
  handler.post(drawRunner);
}

You can see the part of code has

private List<MyPoint> circles;

This is the part that i dont understand? What is happening in here? What will List<MyPoint> pass in the circles? Anyone knows what to call this? is this list reffering to a class? Cause im not sure on my title. Thank you..

  • 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-10T10:38:20+00:00Added an answer on June 10, 2026 at 10:38 am
    private List<MyPoint> circles;
    

    States that circles is a List of type MyPoint, (ie. it will hold objects of type MyPoint).

    circles = new ArrayList<MyPoint>();
    

    Now in the above line you are assigning the ArrayList object of type MyPoint to the Object Reference Variable of type List.

    This is called as Interface Polymorphism.

    List is an Interface, where as ArrayList a Concrete Class which implements List.

    Eg:

    public class Dog{
    
       private String dName;
       priavet int dAge;
    
       public Dog(String dName, String dAge){
    
          this.dName = dName;
          this.dAge = dAge;
    
    
       }
    
    
    
       public String getDName(){
    
            return this.dName;
    
       }
    
       public String getDName(){
    
            return this.dAge;
    
       }
    
    }
    
    
    public class Test{
    
    
     public static void main(String[] args){
    
         List<Dog> dAList = new ArrayList<Dog>();
    
         dAList.add(new Dog("Tommy",5));
         dAList.add(new Dog("Stark",2));
    
         for(Dog d : dAList){   // Iterating over the List of Dog objects
    
               System.out.println(d.getDName());
               System.out.println(d.getDAge());
    
             }
    
    
         }
    
    
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i studying TDateTime functions and procedure, but not found something that allow me to
Im studying some ruby code and I see this varx variable being used with
I was just studying OCPJP questions and I found this strange code: public static
while studying some security things, there was a question that one can guess the
Studying Seam 3, I discovered that Seam Solder allows the @Named annotation to be
Studying C conversions I found a paragraph about Integer promotions that I haven't understand
Studying Haskell, i'm trying to code a function takeIf that given a condition and
Studying asp.net mvc 3 + EF code-first. I am new to both. My example
In studying actionscript 3's graphics class, I've come across the undocumented drawRoundRectComplex() method. It's
While studying the Collection API, we find that some methods ( add , remove

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.