alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

Java example source code file (T6253161.java)

This example Java source code file (T6253161.java) is included in the alvinalexander.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Learn more about this Java project at its project page.

Java - Java tags/keywords

arraylist, list, suppresswarnings, t6253161, util

The T6253161.java Java example source code

/*
 * @test  /nodynamiccopyright/
 * @bug     6253161
 * @summary Compiler will fail to find the correct location of serial warnings for anonymous inner classes
 * @author  Seetharama Avadhanam
 * @compile -Xlint:serial -XDdev T6253161.java
 * @compile/ref=T6253161.out -Xlint:serial -XDdev -XDrawDiagnostics T6253161.java
 */
import java.util.List;
import java.util.ArrayList;

public class T6253161 {
    @SuppressWarnings("unchecked")
    public void anonymousMethod(){
           List list = new ArrayList<String>(){
           static final long serialVersionUID = 1;
           List list = new ArrayList<Integer>();
           public List<Integer> getMyList(){
                final List floatList = new ArrayList<Float>(){
                    List integerList = new ArrayList<Float>();
                    public List<Float> getMyList(){
                        for(int i=0;i<10;i++)
                            integerList.add((int)((Float.parseFloat(i+""))+(1.11F)));
                        return (List)(Object)integerList;
                    }
                    public void testMethods(){
                        //...
                    }
                }.getMyList();
                for(int i=0;i<10;i++)
                    list.add((Float)(floatList.get(i)) * 11.232F * i);
                return list;
            }
         }.getMyList();
    }
}

Other Java examples (source code examples)

Here is a short list of links related to this Java T6253161.java source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.