Skip to main content

Freshers & Experienced Openings July 2024

https://www.pharmatutor.org/content/july-2024/biocon-biologics-walk-in-drive-for-mpharm-bpharm-msc-in-qa-qc-manufacturing

Java J2EE Interview Questions and Answers - Part 5

  1. Which containers use a Border layout as their default layout?- Window, Frame and Dialog classes use a BorderLayout as their layout.
  2. Which containers use a Flow layout as their default layout?- Panel and Applet classes use the FlowLayout as their default layout.
  3. What are wrapper classes?- Wrapper classes are classes that allow primitive types to be accessed as objects.
  1. What are Vector, Hashtable, LinkedList and Enumeration?- Vector : The Vector class provides the capability to implement a growable array of objects. Hashtable : The Hashtable class implements a Hashtable data structure. A Hashtable indexes and stores objects in a dictionary using hash codes as the object’s keys. Hash codes are integer values that identify objects. LinkedList: Removing or inserting elements in the middle of an array can be done using LinkedList. A LinkedList stores each object in a separate link whereas an array stores object references in consecutive locations. Enumeration: An object that implements the Enumeration interface generates a series of elements, one at a time. It has two methods, namely hasMoreElements() and nextElement(). HasMoreElemnts() tests if this enumeration has more elements and nextElement method returns successive elements of the series.
  2. What is the difference between set and list?- Set stores elements in an unordered way but does not contain duplicate elements, whereas list stores elements in an ordered way but may contain duplicate elements.
  3. What is a stream and what are the types of Streams and classes of the Streams?- A Stream is an abstraction that either produces or consumes information. There are two types of Streams and they are: Byte Streams: Provide a convenient means for handling input and output of bytes. Character Streams: Provide a convenient means for handling input & output of characters. Byte Streams classes: Are defined by using two abstract classes, namely InputStream and OutputStream. Character Streams classes: Are defined by using two abstract classes, namely Reader and Writer.
  1. What is the difference between Reader/Writer and InputStream/Output Stream?- The Reader/Writer class is character-oriented and the InputStream/OutputStream class is byte-oriented.
  2. What is an I/O filter?- An I/O filter is an object that reads from one stream and writes to another, usually altering the data in some way as it is passed from one stream to another.
  3. What is serialization and deserialization?- Serialization is the process of writing the state of an object to a byte stream. Deserialization is the process of restoring these objects.
  1. What is JDBC?- JDBC is a set of Java API for executing SQL statements. This API consists of a set of classes and interfaces to enable programs to write pure Java Database applications.
  2. What are drivers available?- a) JDBC-ODBC Bridge driver b) Native API Partly-Java driver c) JDBC-Net Pure Java driver d) Native-Protocol Pure Java driver
  3. What is the difference between JDBC and ODBC?- a) OBDC is for Microsoft and JDBC is for Java applications. b) ODBC can’t be directly used with Java because it uses a C interface. c) ODBC makes use of pointers which have been removed totally from Java. d) ODBC mixes simple and advanced features together and has complex options for simple queries. But JDBC is designed to keep things simple while allowing advanced capabilities when required. e) ODBC requires manual installation of the ODBC driver manager and driver on all client machines. JDBC drivers are written in Java and JDBC code is automatically installable, secure, and portable on all platforms. f) JDBC API is a natural Java interface and is built on ODBC. JDBC retains some of the basic features of ODBC.
  1. What are the types of JDBC Driver Models and explain them?- There are two types of JDBC Driver Models and they are: a) Two tier model and b) Three tier model Two tier model: In this model, Java applications interact directly with the database. A JDBC driver is required to communicate with the particular database management system that is being accessed. SQL statements are sent to the database and the results are given to user. This model is referred to as client/server configuration where user is the client and the machine that has the database is called as the server. Three tier model: A middle tier is introduced in this model. The functions of this model are: a) Collection of SQL statements from the client and handing it over to the database, b) Receiving results from database to the client and c) Maintaining control over accessing and updating of the above.
  2. What are the steps involved for making a connection with a database or how do you connect to a database? a) Loading the driver : To load the driver, Class. forName() method is used. Class. forName(”sun. jdbc. odbc. JdbcOdbcDriver”); When the driver is loaded, it registers itself with the java. sql. DriverManager class as an available database driver. b) Making a connection with database: To open a connection to a given database, DriverManager. getConnection() method is used. Connection con = DriverManager. getConnection (”jdbc:odbc:somedb”, “user”, “password”); c) Executing SQL statements : To execute a SQL query, java. sql. statements class is used. createStatement() method of Connection to obtain a new Statement object. Statement stmt = con. createStatement(); A query that returns data can be executed using the executeQuery() method of Statement. This method executes the statement and returns a java. sql. ResultSet that encapsulates the retrieved data: ResultSet rs = stmt. executeQuery(”SELECT * FROM some table”); d) Process the results : ResultSet returns one row at a time. Next() method of ResultSet object can be called to move to the next row. The getString() and getObject() methods are used for retrieving column values: while(rs. next()) { String event = rs. getString(”event”); Object count = (Integer) rs. getObject(”count”);
  3. What type of driver did you use in project?- JDBC- ODBC Bridge driver (is a driver that uses native(C language) libraries and makes calls to an existing ODBC driver to access a database engine).

Comments

Post a Comment

Popular Posts

Freshers & Experienced Openings July 2024

https://www.pharmatutor.org/content/july-2024/biocon-biologics-walk-in-drive-for-mpharm-bpharm-msc-in-qa-qc-manufacturing

Wise Disk Cleaner

Wise Disk Cleaner is a free disk utility designed to help you keep your disk clean by deleting any unnecessary files. Wise Disk Cleaner, with its intuitive and easy to use interface, helps to quickly wipe out all the junk files. It works quite fast while scanning for files and deleting them. The developers aver that it the first system slimming tool that removes Windows useless files, Windows Sample music, videos, pictures, Installers and Uninstallers of Updates Patches etc. Wise Disk Cleaner supports Windows XP/Vista /7/8 (All Editions, including 32-bit and 64-bit) and server 2000, 2003 and 2008. http://www.wisecleaner.com/soft/WDCFree.exe

Java, Developer / Sr. Developer WALK-IN Mumbai & Bangalore on Saturday 10th March 2012

Our next WALK-IN event for experienced software professionals is scheduled in Mumbai & Bangalore on Saturday 10 th March 2012 as per details below. Qualification            :   B.Sc / BCA / B.E / B Tech / MCA / Post Graduate Selection process   :   Technical Test (up to 4 years Relevant Experience) + Interviews Date : March 10, 2012 (Saturday)            Event   Location : Mumbai                          Time : 10am to 3pm Role      :  Developer     Skills     :   Java, JSP, Servlets with Struts /                    Springs / GWT   Work Location   : Mumbai   Relevant Exp     : 1 - 4 Yrs Venue : Oracle Financial Services Software Ltd, Oracle Park, Off Western Express Highway, Goregaon (East), Mumbai 400 063.   Contact Number : +91-22-6718 4000 Date : March 10, 2012 (Saturday)            Event   Location : Bangal...

Freeware / Free Software's 1 Jul 2010

Cloud Scanner Comodo Cloud Scanner (CCS) is an online service which can quickly and accurately identify malware, viruses, junk files, registry errors and hidden processes that may be lurking in a computer. Comodo Cloud Scanner audits all processes that are running on a computer then verifies them in real time with its 'live' database. Its features include: Detects malware and suspicious files, discovers privacy issues & identity traces, reveals corrupt, unwanted and invalid registry entries, Identifies junk files on a disk, and detects hidden processes running in a computer. Cloud Scanner, a small download, takes up minimal disk space and RAM, for Windows XP, Windows Vista, Windows 7, and Windows Server 2003/ 2008, can be downloaded at http://www.comodo.com/home/download/download.php?prod=cloud-scanner At a cost Comodo also offers 24/7 LivePCSupport, a tech support expert's service, to optimize a computer. Explorer++ Explorer++ is for power users and ...

Special Referral Campaign for Freshers!

namaskara, 2009 passout freshers ge udyoga avakaasha ide.  kelsakke bekagiruva vivara higide. idakke sari honduvaru iddare nanange  varrav22@yahoo.co.in nimma minche kaluhisi. The Process:   1.     Fill in the attached excel-sheet with the details of the candidates that you are referring – This is mandatory!   2.      And not to forget – They should be a B.E./M.Tech/MCA. The branches are – Computer Science, ECE, EEE, IT and they should be a 2009 or later pass out and should have got at least 70% or 7 CGPA   3.      There will be a written test of 2 hour duration consisting of – Quantitative, Problem Solving & Verbal Ability and a Technical test consisting of Java, Data Structures and C   4.      The cut-off date for sending the same is Tuesday COB 23-March-2010   5.      We will review the profiles and call the candidates for the written test scheduled for Saturday       Cheers! Varsha

DOT NET Interview Questions with Answers

When not to use Design Patterns? Do not use design patterns in any of the following situations. • When the software being designed would not change with time. • When the requirements of the source code of the application are unique. If any of the above applies in the current software design, there is no need to apply design patterns in the current design and increase unnecessary complexity in the design. When to use Design Patterns? Design Patterns are particularly useful in one of the following scenarios. • When the software application would change in due course of time. • When the application contains source code that involves object creation and event notification. Benefits of Design Patterns: The following are some of the major advantages of using Design Patterns in software development. • Flexibility • Adaptability to change • Reusability What are Design Patterns? A Design Pattern essentially consists of a p...

Contact Form

Name

Email *

Message *