Wednesday, February 16, 2011

Java - Interview Questions and Answers




Ques: 
What if the main method is declared as private?

Ans:
 The program compiles properly but at runtime it will give “Main method not public.” message

************************************************************************************
Ques:
What is meant by pass by reference and pass by value in Java?

Ans:
 Pass by reference means, passing the address itself rather than passing the value. Pass by value means passing a copy of the value.


************************************************************************************
Ques:  What gives java it’s “write once and run anywhere” nature?

Ans : All Java programs are compiled into class files that contain bytecodes. These byte codes can be run in any platform and hence java is said to be platform independent.
************************************************************************************
Ques: What if the static modifier is removed from the signature of the main method?

                                                              (OR)
Ques: What if I do not provide the String array as the argument to the method?

Ans:
Program compiles. But at runtime throws an error “NoSuchMethodError”.
************************************************************************************
Ques:
 What is final, finalize() and finally?

Ans:
o final - declare constant
o finally - handles exception
o finalize - helps in garbage collection
Final:
A final class can’t be extended i.e., final class may not be subclassed. This is done for security reasons with basic classes like String and Integer.  
A final method can’t be overridden when its class is inherited. You can’t change value of a final variable (is a constant)
Finalize():
finalize() method is used just before an object is destroyed and garbage collected.
Finally:
Finally, a key word used in exception handling and will be executed whether or not an exception is thrown. For Ex..C
losing of open connections is done in the finally method
************************************************************************************
Ques:
What is the GregorianCalendar class?
Ans:
The GregorianCalendar provides support for traditional Western calendars

************************************************************************************
Ques:

Is sizeof a keyword in java?
Ans:
The sizeof operator is not a keyword.
************************************************************************************
Ques:
What is a native method?
Ans:
A native method is a method that is implemented in a language other than Java
************************************************************************************
Ques:
In System.out.println(), what is System, out and println?
Ans:
System is a predefined final class, out is a PrintStream object and println is a built-in overloaded method in the out object.
************************************************************************************
Ques:
Explain the Polymorphism?
Ans:
Polymorphism in simple terms means one name many forms.

Polymorphism exists in three distinct forms in Java:
• Method overloadingdsdsad
• Method overriding through inheritance
• Method overriding through the Java interface
***************************************************************************************
Monday, February 14, 2011

SQL - Structured Query Language


INTRODUCTION:

SQL is a database computer language designed for managing data in Relational Data Base Management System(RDBMS). Its scope includes data insert,query,update,delete,creation,modification and data access control.

SQL was developed at IBM by Donald D.Chamberlin and Raymond F.Boyce in the early 1970's.
This version, initially called SEQUEL(Structured English QUEry Language), was designed to manipulate and retrieve data stored in IBM's original quasi-relational database management system.

The RDBMS was developed at MIT in the early 1970's, soon developed by Ingres,developed in 1974,who implemented query language is known as QUEL.which was later supplanted in the market place by SQL.

SQL statements that are specific to Oracle. Oracle offers a comprehensive high performance infrastructure for a e-business. It is called Oracle9i. Oracle9i includes everything needed to develop,deploy and manage internet applications.

Benefits Of Oracle9i:

  • Scalability from departments to enterprise e-business sites.
  • Robust and Reliable.
  • Available and Secure architecture.
  • Easy to learn
  • Leverage an organization's current skillset throughout the Oracle platform(Including SQL,PL/SQL,JAVA, and XML)
  • One management interface for all applications.

Oracle9i Database:

The roles of the two products are very straightforward. It manages all your data . This is not just the object relational data that you expect an enterprise database to manage. It can also be unstructured data like:
  • Spreadsheets
  • Word Documents
  • Power Point Presentations
  • XML
  • Multimedia data types like MP3,Graphics,Video and more.
The data does not even have to be in the database.It has services through which you can store meta-data about information stored in the file systems. You can use the database server to manage and serve information wherever it is located.

Storing Information:

Every organization has some information needs. For example,a company needs to save information about employees,departments and salaries.These pieces of information are called data.
All the data's are stored in database. A database is an organized collection of information.To manage databases, you need database management systems(DBMS). A DBMS is a program that stores,retrieves and modifies data in the datebase on request.

These are four main types of databases:
  • Hierarchial
  • Network
  • Relational
  • More recently Object Reletional.

Relating Multiple Tables:
  • Each row of data in a table is uniquely identified by a primary key(PK).
  • You can logically relate data from multiple tables using foreign keys(FK).
Guidelines for Primary keys and Foreign keys:
  • You cannot use duplicate values in a primary key.
  • Primary keys generally cannot be changed.
  • Foreign keys are based on data values and are purely logical,not physical,pointers.
  • A Foreign key values must match an existing primary key value or unique key value,or else be Null.
  • A Foreign key must reference either a primary key or unique key column.

SQL STATEMENTS:
------------------------------------------------------------
SELECT = = = = = = = = = Data Retrieval
------------------------------------------------------------
INSERT
UPDATE
DELETE = = = = = = = = =Data Manipulation Language(DML)
MERGE
------------------------------------------------------------
CREATE
ALTER
DROP = = = = = = = = = = Data Definition Language(DDL)
RENAME
TRUNCATE
------------------------------------------------------------
COMMIT
ROLLBACK = = = = = = = Transaction control
SAVEPOINT
------------------------------------------------------------
GRANT
REVOKE = = = = = = = = Data Control Language(DCL)
------------------------------------------------------------



JAVA - Programming Language


Introduction:
Java was developed by James Gosling, Patrick Naughton, Chris Warth, Ed Frank, and Mike Sheridan at Sun Microsystem, in 1991.This language was initially called "Oak" then renamed "Java" in 1995. Java is a Platform-independent.

Principles:

  • Simple and Object Oriented.
  • Robust and secure.
  • Architecture Neutral and Portable.
  • High Performance.
  • Interpreted,threaded and Dynamic.


Friday, February 11, 2011

WELCOME TO RASIGATECH


Hai,

 Welcome to All.
  This one for who are all searching job in IT Careers.
  We are providing Basic Interview Technical Questions 
  and Answers,SQL,JAVA,J2EE,TESTING Notes.

  We hope this one very useful for all. 
  All The Best.
  
 Authors & Technical Specialists,
 Gopal A
 Bharathidasan M
 Rajendran R
 Karthick K
 
  
RASIGATECH. Powered by Blogger.

Popular Posts

Followers