test/tools/javac/boxing/Boxing1.java

Print this page




   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
  20  * CA 95054 USA or visit www.sun.com if you need additional information or
  21  * have any questions.
  22  */
  23 
  24 /*
  25  * @test
  26  * @bug 4869233 4872709 4868735 4921949 4921209 4965701 4934916 4975565 4974939
  27  * @summary Boxing/unboxing positive unit and regression tests
  28  * @author gafter
  29  *
  30  * @compile -source 1.5 Boxing1.java
  31  * @run main Boxing1
  32  */
  33 
  34 public class Boxing1 {
  35 
  36     static Boolean _Boolean = true;
  37     static boolean _boolean = _Boolean;
  38 
  39     static Byte _Byte = (byte)3;
  40     static byte _byte = _Byte;
  41 
  42     static Character _Character = 'a';
  43     static char _char = _Character;
  44 
  45     static Short _Short = (short)4;
  46     static short _short = _Short;
  47 
  48     static Integer _Integer = 5;
  49     static int _int = _Integer;
  50 
  51     static Long _Long = 12L;




   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
  20  * CA 95054 USA or visit www.sun.com if you need additional information or
  21  * have any questions.
  22  */
  23 
  24 /*
  25  * @test
  26  * @bug 4869233 4872709 4868735 4921949 4921209 4965701 4934916 4975565 4974939
  27  * @summary Boxing/unboxing positive unit and regression tests
  28  * @author gafter



  29  */
  30 
  31 public class Boxing1 {
  32 
  33     static Boolean _Boolean = true;
  34     static boolean _boolean = _Boolean;
  35 
  36     static Byte _Byte = (byte)3;
  37     static byte _byte = _Byte;
  38 
  39     static Character _Character = 'a';
  40     static char _char = _Character;
  41 
  42     static Short _Short = (short)4;
  43     static short _short = _Short;
  44 
  45     static Integer _Integer = 5;
  46     static int _int = _Integer;
  47 
  48     static Long _Long = 12L;