Subscribe

RSS Feed (xml)

Powered By

Skin Design:
Free Blogger Skins

Powered by Blogger

Monday, September 7, 2009

Java Quiz -15

Hi friends,

Today I would like to present few concepts in Open Source and Java API's in today's Quiz which would be helpful for the readers.

Without wasting further time, Here We Go!

Round : Open Source Round

1.Who started the open source movement?
Richard Stallman

2.What does”free as freedom, free as in beer” means in the context of Open Source?
“free as freedom” phrase describes that the users can modify the functionality of the open source.
“free as in beer” phrase describes that the users can get the liscence free of cost.


3.Give the name three Open Source softwares?
UNIX,LINUX,Perl

4.Give the name of three open source databases?
Hsql,MySql,PostgreSQL


5.What is the name of open source webserver which is most widely used webserver in the world?
Apache,Jakarta Tomcat,Tornado

Round : Java API's Round

1. How do you achieve custom serialization?
We can achieve this by overriding the writeObject() and readObject() methods in ObjectOutputStream and ObjectInputStream.

2. I have an int column in the database that is null.
I do a rs.getInt() on that column and get a 0.
How do u find out whether the column has a value of 0 or its null?

Using the rs.wasNull() will return a boolean.

3.I have a list of String objects.
I want to create string array from the list not an object array.
How do u achieve this?

ArrayList a1 = new ArrayList();
a1.add("1");
a1.add("2");
a1.add("3");
String st1[] = new String[a.size()];
for(int i=0; i st1[i]=a1.get(i);
}

Hope you found this useful! Kindly give me your comments regarding the same.Many more Quizzes are yet to be posted! Kindly make use of them as much as possible!

No comments: