Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java and JDK > Java Basics
|
Java Basics General beginning Java language questions that don't fit in one of the more specific forums. Please specify what version.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Java Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 7th, 2006, 01:47 PM
Authorized User
 
Join Date: Dec 2005
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Default is Array in java are Object?

is Array in java are Object?

int a[]=new int[10];

new will allocate memory. but int is a type not an Class ?

please help me.......
 
Old January 14th, 2006, 06:50 AM
Authorized User
 
Join Date: Dec 2005
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yes all arrays in java (even primitive arrays) are implicit derivatives of Object class.

________
Adarsh
 
Old January 15th, 2006, 09:40 AM
Authorized User
 
Join Date: Dec 2005
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Array is a objext.but int i=0;,i is not a object


http://www.wisesoft.biz/

 
Old March 20th, 2006, 11:21 PM
Authorized User
 
Join Date: Mar 2006
Posts: 40
Thanks: 0
Thanked 0 Times in 0 Posts
Default

int a[]=new int[10]; -> Array of primitive datatypes (integers)


String str[] = new String[10]; -> Array of String Objects






Similar Threads
Thread Thread Starter Forum Replies Last Post
Dotnet array object in javascript ramesh.b ASP.NET 1.0 and 1.1 Basics 0 November 26th, 2007 07:27 AM
Array or Object?? netpicker9 Classic ASP Professional 1 June 3rd, 2007 06:43 PM
Accessing elements of an Array object abdulqadirpk VB How-To 1 April 2nd, 2007 11:13 AM
Java to XSL // Return Array go4java XSLT 3 June 29th, 2006 06:05 PM
Passing jagged array to com object nutrino VB How-To 0 January 27th, 2006 01:07 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.