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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T03:05:10+00:00 2026-05-30T03:05:10+00:00

I have an ArrayList of Path values. I need to convert it into String

  • 0

I have an ArrayList of Path values. I need to convert it into String values and know what all coordinates were covered in the Path.
Here’s the code that I worked up:

private ArrayList<Path> pointsToDraw = new ArrayList<Path>();
private List<String> stringPoints ;



synchronized(pointsToDraw){
                    for(Path path : pointsToDraw)
                    {
                        stringPoints.add(String.valueOf(path));
                    }

                    TextView b1Text = (TextView) findViewById(R.id.GText);
                    for(String s : stringPoints)
                    {
                        b1Text.setText(s);
                    }
                    }

I get an exception during runtime. The following is the log content :

02-21 18:18:29.323: E/AndroidRuntime(512): FATAL EXCEPTION: main
02-21 18:18:29.323: E/AndroidRuntime(512): java.lang.NullPointerException
02-21 18:18:29.323: E/AndroidRuntime(512):  at learn.myandroidapp.hr.HRCanvas$1.onClick(HRCanvas.java:78)
02-21 18:18:29.323: E/AndroidRuntime(512):  at android.view.View.performClick(View.java:3511)
02-21 18:18:29.323: E/AndroidRuntime(512):  at android.view.View$PerformClick.run(View.java:14105)
02-21 18:18:29.323: E/AndroidRuntime(512):  at android.os.Handler.handleCallback(Handler.java:605)
02-21 18:18:29.323: E/AndroidRuntime(512):  at android.os.Handler.dispatchMessage(Handler.java:92)
02-21 18:18:29.323: E/AndroidRuntime(512):  at android.os.Looper.loop(Looper.java:137)
02-21 18:18:29.323: E/AndroidRuntime(512):  at android.app.ActivityThread.main(ActivityThread.java:4424)
02-21 18:18:29.323: E/AndroidRuntime(512):  at java.lang.reflect.Method.invokeNative(Native Method)
02-21 18:18:29.323: E/AndroidRuntime(512):  at java.lang.reflect.Method.invoke(Method.java:511)
02-21 18:18:29.323: E/AndroidRuntime(512):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
02-21 18:18:29.323: E/AndroidRuntime(512):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
02-21 18:18:29.323: E/AndroidRuntime(512):  at dalvik.system.NativeStart.main(Native Method)

Where am I going wrong? Please help!

  • 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-30T03:05:11+00:00Added an answer on May 30, 2026 at 3:05 am

    stringPoints has not been allocated a list.

    Change:

    private List<String> stringPoints ;
    

    to:

    private List<String> stringPoints = new ArrayList<String>();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an ArrayList<String> that I'd like to return a copy of. ArrayList has
I have an arraylist that gets different type of values in it, 1st value->
I need to write a method that loops through ArrayList<String> pathClientStatic and then copies
I have an ArrayList<String> , and I want to remove repeated strings from it.
I have an arraylist that contains items called Room. Each Room has a roomtype
I have an ArrayList that I want to use to hold RaceCar objects that
I have an arraylist namelist in my model and in my view I need
I have a powershell script with the following code in it... $appdir = Split-Path
I have a error that I can not get rid of, but the code
I'm trying to select all elements that have a given class and remove them

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.