How to make the INT type variable, be an object?

xiaoxiao2021-03-06  67

In Java, the String type itself is an object.

But INT is not.

What should I do if I want to use an INT type?

This is ok: Integer P = new integer (1);

Write this in the API help:

Constructor SummaryInteger (int? Value) ?????????? Constructs a newly allocated Integer object that represents the specified int value.Integer (String? S) ?????????? Constructs a newly allocated INTEger Object this represents the int value indeicated by the string parameter.

These two are constructor.

转载请注明原文地址:https://www.9cbs.com/read-119954.html

New Post(0)