Posts by Alexandre S. V. Oliveira • 89 points
3 posts
-
0
votes1
answer64
viewsQ: "short s = 2;" Does Java already understand 2 as short?
I know that by default when initializing a variable of an integer type Java classifies it as int, but in the case of short s = 2, Java already understands 2 as short? Or is there some conversion?…
-
3
votes2
answers3493
viewsQ: Difference between primitive type and object in Java
In Java, we have so-called primitive types and so-called objects. What’s the difference between the two?
-
4
votes1
answer155
viewsQ: Array and type being created
In Java, when I have the following instruction: int[] ns = new int[5]; the following doubts arise: An object of what type is created? For each value in an index, I call it an instance?…