java - Is int[] an object? -


this question has answer here:

had look, , can't seem find question same this. question int[] in java.

when create int[], use syntax:

int[] x = new int[5]; 

the methods part of int[] make me think it's object, doesn't follow java naming convention classes, what's confusing me. array of primitive type, can used primitive.

is int[] (or primitive array guess) object, or primitive?

an array in java subclass of object, therefore it's object type - if contains primitive types. can check this:

int[] x = new int[5]; if (x instanceof object)     system.out.println("it's object!"); 

Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -