Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generics syntax <> not showing up in code examples #204

Open
willchamberlain opened this issue Aug 29, 2016 · 2 comments
Open

Generics syntax <> not showing up in code examples #204

willchamberlain opened this issue Aug 29, 2016 · 2 comments

Comments

@willchamberlain
Copy link

Hello: http://learningprocessing.com/examples/chp23/example-23-05-mouse-history-pvector -->

    // Grab the current PVector
    PVector position = (PVector)history.get(i);
@shiffman
Copy link
Owner

Oh, the example uses generics

ArrayList<PVector> history = new ArrayList<PVector>();

which makes it so that the casting is not required. I think the <> is fooling the page into thinking it's an HTML tag and is not being shown. Need to look into fixing this.

@shiffman shiffman changed the title Mouse History example needs a cast to PVector when acessing the ArrayList - Java 1.8 Generics syntax <> not showing up in code examples Aug 30, 2016
@willchamberlain
Copy link
Author

Thanks!

On 31 Aug 2016 4:44 am, Daniel Shiffman [email protected] wrote:

Oh, the example uses generics

ArrayList history = new ArrayList();

which makes it so that the casting is not required. I think the <> is fooling the page into thinking it's an HTML tag and is not being shown. Need to look into fixing this.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com//issues/204#issuecomment-243539279, or mute the threadhttps://github.com/notifications/unsubscribe-auth/APWTHJeAlAqgu0sW9o8im7KR7IRUQ6Yqks5qlHn3gaJpZM4JvFR5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants