|
Java example source code file (BadlyTypedLabel1.java)
The BadlyTypedLabel1.java Java example source code/* * @test /nodynamiccopyright/ * @bug 6827009 * @summary Check for case labels of different types. * @compile/fail -source 6 BadlyTypedLabel1.java * @compile/fail/ref=BadlyTypedLabel1.out -XDrawDiagnostics BadlyTypedLabel1.java */ class BadlyTypedLabel1 { String m(String s) { switch(s) { case "Hello World": return(s); case 42: return ("Don't forget your towel!"); } } } Other Java examples (source code examples)Here is a short list of links related to this Java BadlyTypedLabel1.java source code file: |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
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.