GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Interview Questions  >  J2EE  >  Java
Go To First  |  Previous Question  |  Next Question 
 Java  |  Question 887 of 923    Print  
what is the data type we are using for storing different types of data in a single array?

  
Total Answers and Comments: 2 Last Update: December 05, 2007     Asked by: vanig05 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
November 20, 2007 02:38:13   #1  
agnihotri111984 Member Since: November 2007   Contribution: 2    

RE: what is the data type we are using for storing dif...
according to my knowledge it is impossible but if it is possible then also share this information with me at agnihotri111985@timesindia.com.
 
Is this answer useful? Yes | No
December 05, 2007 01:14:46   #2  
rkbalag Member Since: December 2007   Contribution: 1    

RE: what is the data type we are using for storing different types of data in a single array?
We can use Hashtable to store different types of data in a single array

Hashtable hash = new Hashtable();
hash.put("INT_OBJ",new Integer("1"));
hash.put("STR_OBJ",new String("A")); 
hash.put("BOL_OBJ",new BOOLEAN(true)); 

 
Is this answer useful? Yes | No

 Related Questions

It uses those low order bytes of the result that can fit into the size of the type allowed bythe operation. 
Latest Answer : In java there is no point of overflow and underflow, it was there in C. For avoiding that java introduces type casting. Java will allow some more space from the defult space of primtive type. ...

The Vector class provides the capability to implement a growable array of objects 
Latest Answer : A vector implements dynamic array, which can grow and shrink dynamically.It is similar to Arraylist with a difference that vector can be synchronized. it also contain some legacy methods. ...

Wrapped classes are classes that allow primitive types to be accessed as objects. 
Latest Answer : Wrapped classes are used to Primative data types as an Object.EX: int val1; val=10;        val=new Integer(); ...

The default value of an String type is null. 
Latest Answer : We use overriding when method avaliable in super class doesnot satisfyour requirement.That is To extend the alreadyavailable feature wew use overloading.If we require the new functionality other than, what we already have we go for Overriding. ...

The range of the short type is -(2^15) to 2^15 - 1. 
Latest Answer : 2 bytes, signed (two's complement), -32,768 to 32,767 ...

The range of the char type is 0 to 2^16 - 1. 
Latest Answer : char is unsigned so its minimum value is 0. It can't be negative. ...

A program's main() method takes an argument of the String[] type. 
Latest Answer : you write public static void main(String args[])so the argument type isstring and whatever input you give asjava abs "asd" 1then all the 3 arguments are stored int he corresponding string format in the args array and if you write for(int ...

A catch clause can catch any exception that may be assigned to the Throwable type. Thisincludes the Error and Exception types. 

Name the eight primitive Java types.The eight primitive types are byte, char, short, int, long, float, double, and boolean.

The operating system's task scheduler allocates execution time to multiple tasks. Byquickly switching between executing tasks, it creates the impression that tasks executesequentially. 
Latest Answer : Hyperthreading processors have more than one execution units but only one processor core, thats how multiple tasks are performed simultaneously ...


 Sponsored Links

 
Related Articles

Service Oriented Java Business Integration Review

Service Oriented Java Business Integration Review Introduction If you ve read through the texts which give you an introduction to SOA or Web Services you will often find them to be quite frustrating and the reason for this is because they spend too much time referencing business processes which are
 

Breaking up XML into Relational Data

Breaking up XML into Relational Data While the preceding example shows how to construct an XML representation over relational data the example in this section illustrates how you can shred XML data back into relational data This reverse operation can be useful if your application works with relation
 

Querying Data with Oracle XQuery

Querying Data with Oracle XQuery Starting with Oracle Database 10g Release 2 you can take advantage of a full featured native XQuery engine integrated with the database With Oracle XQuery you can accomplish various tasks involved in developing PHP Oracle XML applications operating on any kind of dat
 

Retrieving XML Data

Retrieving XML DataTo retrieve XML data from an XMLType table you can use a SELECT SQL statement just as you would if you had to query a relational table For example to select the employee with the id set to 100 from the employees XMLType table discussed in the preceding section you might issue the
 

Using XMLType for Handling XML Data in the Database

Using XMLType for Handling XML Data in the Database Being an object type XMLType can not only be used to store XML data in the database but also to operate on that data via its built in methods Regardless of the storage model you choose XMLType provides a set of XML specific methods to operate on XM
 

Using Oracle Database for Storing, Modifying, and Retrieving XML Data

Using Oracle Database for Storing Modifying and Retrieving XML Data With Oracle XML DB you have various XML storage and XML processing options allowing you to achieve the required level of performance and scalability One of the most interesting things about Oracle XML DB is that it allows you to per
 

ODP.NET - Techniques to Improve Performance while Retrieving Data

ODP NET Techniques to Improve Performance while Retrieving Data Performance tuning is a great subject in Oracle Volumes of books would not be enough to cover every aspect of performance tuning in Oracle However in this section we will only discuss the fundamental performance techniques while working
 

ODP.NET - Populating a Dataset with a Single Data Table

ODP NET Populating a Dataset with a Single Data Table A dataset is simply a group of data tables These data tables can be identified with their own unique names within a dataset You can also add relations between data tables available in a dataset mosgoogle The following code gives you the details o
 

ODP.NET - Retrieving a Single Row of Information Using OracleDataAdapter

ODP NET Retrieving a Single Row of Information Using OracleDataAdapter In the previous example we worked with a set of rows in the DataTable object Now we shall work with a particular row using the DataTable object The following code accepts an employee number from the user and gives you the details
 

ODP.NET - Retrieving Typed Data

ODP NET Retrieving Typed Data While retrieving values from OracleDataReader we can extract information available in individual columns of a particular row either by using column ordinal position values or column names mosgoogle Retrieving Typed Data Using Ordinals ODP NET provides data specific enum
 





About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape