|
1 | 1 | /* |
2 | | - * Copyright (c) 1996, 2022, Oracle and/or its affiliates. All rights reserved. |
| 2 | + * Copyright (c) 1996, 2023, Oracle and/or its affiliates. All rights reserved. |
3 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 | 4 | * |
5 | 5 | * This code is free software; you can redistribute it and/or modify it |
|
249 | 249 | * <blockquote><pre> |
250 | 250 | * int fileCount = 1273; |
251 | 251 | * String diskName = "MyDisk"; |
252 | | - * Object[] testArgs = {new Long(fileCount), diskName}; |
| 252 | + * Object[] testArgs = {Long.valueOf(fileCount), diskName}; |
253 | 253 | * |
254 | 254 | * MessageFormat form = new MessageFormat( |
255 | 255 | * "The disk \"{1}\" contains {0} file(s)."); |
|
275 | 275 | * |
276 | 276 | * int fileCount = 1273; |
277 | 277 | * String diskName = "MyDisk"; |
278 | | - * Object[] testArgs = {new Long(fileCount), diskName}; |
| 278 | + * Object[] testArgs = {Long.valueOf(fileCount), diskName}; |
279 | 279 | * |
280 | 280 | * System.out.println(form.format(testArgs)); |
281 | 281 | * </pre></blockquote> |
|
307 | 307 | * will be the final result of the parsing. For example, |
308 | 308 | * <blockquote><pre> |
309 | 309 | * MessageFormat mf = new MessageFormat("{0,number,#.##}, {0,number,#.#}"); |
310 | | - * Object[] objs = {new Double(3.1415)}; |
| 310 | + * Object[] objs = {Double.valueOf(3.1415)}; |
311 | 311 | * String result = mf.format( objs ); |
312 | 312 | * // result now equals "3.14, 3.1" |
313 | | - * objs = null; |
314 | 313 | * objs = mf.parse(result, new ParsePosition(0)); |
315 | | - * // objs now equals {new Double(3.1)} |
| 314 | + * // objs now equals {Double.valueOf(3.1)} |
316 | 315 | * </pre></blockquote> |
317 | 316 | * |
318 | 317 | * <p> |
|
0 commit comments