Вы находитесь на странице: 1из 3

1: Describe about multi threading .What is the significance of java Bytecode?

Ans :Multithreading is executing two parts of same program concurrently.

2.multthreading is a form of multitasking .

3 In thread based multi tasking environment ,a smallest unit of sequential flow of


code is a thread.

4.A progream can contain more than one thread .

5 The two factors to get the benifit of the multithreading are :

The cpu idle time can be minimized

i/o device such as ports ,disks are much slower that CPU.A program spends
amajority of execution time waiting to send or recive datat to or from a device .

The significance of java bytecode are as follows .

Byte code in java is and intermediary compliation of you source .This makes jave
portable and platform independent .

Java is build on WODA (Write Once Deploy Anywhere )principle .Thsi means you
donot have to tewak a Java source code if you want to deploy it in another OS .

But at the end of day ,java programs need a JVM to run on and JVM being machine
language specific cannot be platform -neutral .So we have an intermediary
compliation of source code -called bytecode.

Bytecode is the result of compling a .java file and creating .class file .

Bytecode is portable and s platform agnostice .

The bytecode is compresssed and typically smaller in terms of memory as


compared to source code .So it make sense to ship bytecode over network instead
of shipping source code.

The VMs have a lot of commom tools ( ie all of java.* classes ) available for any app
that needs them .If you plan to complie to native code ,you have to link these in and
that is easier said that done .

Java usese lot of 3rd party API and framework adn framewaorks.
Compare JDBC and ODBC ?

Ans : Software application are written in specific programming language (such as


C# ,c++ ,java) while databases accept queries in some other database specific
language (such as oracle ,sql ).Therefore when a software application needs to
access data in database ,an interface that can translate languages to each
other(database and application) is required .

ODBC (Open Database connectivity) and JDBC (Java Database Connectivity ) are the
interface that solve this specific problem.ODBC is a platform ,language and
operating system independent interface that can be used for this purpose .

JDBC is data API for the java programming language .Java programmers' can use
JDBC-TO-ODBC bridge to talk to any ODBC compliant database.

Diffrence between ODBC and JDBC

ODBC : Stands for OPEN DATABSE CONNECTIVITY .It is an interface for accessing
database .

Statements enable to access files in different database ,including Access


,Database ,Excel and text.

ODBC access the database using SQL requests ,ODBC converts these SQL requests
into a request that Database can understand .

ODBC is a C interface ,So that it cannot be used with java directly ,and its for
microsoft ,used for desktop application.

ODBC require manual installation of the driver manager and driver on client
machine.

ODBC uses Object Oreinted features .

JDBC :Stands for Java Database Connectivity .It is tool by which developers can
connect ,query and update database using SQL ,including group of java classes and
interfaces ,JDBC is built on ODBC .Develpoer has to write code to map an object
models data representation to a relational data model and its database schema .

JDBC is java API (application programming Interface ) used for connceting programs
that is written in java to the data in a relational database .

JDBC Task is to establish the connection wiith the database then send SQL
statements to the DB and finally process the result sets Returned Data .
JDBC allows database aplication to run on diffrent platforms and interact with
doffrent DBMS .

JDBC is used only for connectivity with java .

JDBC is Java version of ODBC

Вам также может понравиться