Geeks Talk

Prepare for your Next Interview


Welcome to the Geeks Talk forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

Arrays

This is a discussion on Arrays within the Java forums, part of the Software Development category; What is the difference between class array, object array and array class ?...

Go Back   Geeks Talk > Software Development > Java
Register Blogs FAQ Tag Cloud Calendar Mark Forums Read

Java Java related Issues and Problems

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-05-2009
Junior Member
 
Join Date: Apr 2009
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
sudeepa123 is on a distinguished road
Arrays

What is the difference between class array, object array and array class ?
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 10-07-2009
Contributing Member
 
Join Date: Aug 2009
Location: Indore
Posts: 33
Thanks: 9
Thanked 5 Times in 5 Posts
Sarje is on a distinguished road
Re: Arrays

If you are talking about java.util.Arrays class then see below

This class contains various methods for manipulating arrays (such as sorting and searching). This class also contains a static factory that allows arrays to be viewed as lists.

methods :

1. static boolean equals(Object[] a, Object[] a2)

2. static void fill(Object[] a, Object val)

3. static int binarySearch(Object[] a, Object key, Comparator c)

4. static boolean equals(Object[] a, Object[] a2)

5. static void sort(Object[] a)

and there overloaded forms(for each primitive data type) , uses of methods are clear from method names.

EXA

public static void main(String args[])
{
String[] strArr1 = {"Name","Sarje","Barange"};
String[] strArr2 = {"Name","Sarje","Barange"};
if(java.util.Arrays.equals(strArr1, strArr2))
{
System.out.println("Both are equal");
}
java.util.Arrays.sort(strArr1);
for(String str : strArr1)
{
System.out.println(str);
}
}

object array means what i think array of Objects if not then waiting for correct reply

thanks
Reply With Quote
Reply

  Geeks Talk > Software Development > Java

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads

Thread Thread Starter Forum Replies Last Post
Arrays in PL/1 reshmamsc MainFrame 0 04-30-2009 03:52 AM
Arrays in Asp.net pshyani ASP.NET 1 05-12-2008 05:35 AM
Help with Arrays harttj Java 1 11-06-2007 12:58 AM
C++ Multidimensional Arrays Lokesh M C and C++ 0 09-05-2007 05:43 AM
C - 2 Dimensional Arrays vikramNR C and C++ 5 07-26-2007 07:19 AM


All times are GMT -4. The time now is 03:44 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.1
Copyright © 2009 GeekInterview.com. All Rights Reserved