Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
32 views

Java 1 Mark

Java database connectivity (JDBC) allows Java programs to access database management systems through a standard API. The JDK includes development tools and the JRE, which provides an environment to run Java programs. Classes in Java can call other classes without inheriting from them. A superclass defines attributes and methods inherited by subclasses. The final keyword restricts modification of variables, methods, and classes. Java APIs provide predefined tools that enable interoperability between applications.

Uploaded by

Leslie Qwer
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views

Java 1 Mark

Java database connectivity (JDBC) allows Java programs to access database management systems through a standard API. The JDK includes development tools and the JRE, which provides an environment to run Java programs. Classes in Java can call other classes without inheriting from them. A superclass defines attributes and methods inherited by subclasses. The final keyword restricts modification of variables, methods, and classes. Java APIs provide predefined tools that enable interoperability between applications.

Uploaded by

Leslie Qwer
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Java 1 mark

1. What is JDBC in Java?


Java database connectivity (JDBC) is the JavaSoft specification of a standard application
programming interface (API) that allows Java programs to access database management
systems. The JDBC API consists of a set of interfaces and classes written in the Java
programming language.

2. What is jvm, JDK, JRE?

■JVM (Java Virtual Machine) is a very important part of both JDK and JRE because it is
contained or inbuilt in both. Whatever Java program you run using JRE or JDK goes into JVM
and JVM is responsible for executing the java program line by line, hence it is also known as
an interpreter.
■JDK (Java Development Kit) is a Kit that provides the environment to develop and
execute(run) the Java program. JDK is a kit(or package) that includes two things
 Development Tools(to provide an environment to develop your java programs)
■ JRE (to execute your java program)
■JRE (Java Runtime Environment) is an installation package that provides an environment
to only run(not develop) the java program(or application)onto your machine. JRE is only used
by those who only want to run Java programs that are end-users of your system.

Q3. multiple classes


Java is an object-oriented programming language. You can create multiple classes in Java
and create a class hierarchy such that one class can call another class. Do not confuse this with
Java inheritance because, in class inheritance, there is a parent-child relationship between
classes.

Q4.w hat is Super class in java?


the superclass, also known as the parent class , is the class from which a child class (or a
subclass) inherits its constructors, methods, and attributes. For instance, in our above example,
BankAccount was the superclass from which our subclass SavingsAccount inherited its values.

Q5. What is the use of final keyword in java?


The final keyword in java is used to restrict the user. The java final keyword can be used in
many context. Final can be:
●variable
●method
●class
The final keyword can be applied with the variables, a final variable that have no value it is
called blank final variable or uninitialized final variable. It can be initialized in the constructor
only. The blank final variable can be static also which will be initialized in the static block only.

Q6. What is Java API?


Java application programming interfaces (APIs) are predefined software tools that easily
enable interactivity between multiple applications.
APIs are important software components bundled with the JDK. APIs in Java include classes,
interfaces, and user Interfaces. They enable developers to integrate various applications and
websites and offer real-time information.

7.What is Unicode?
The Unicode Standard is the universal character representation standard for text in
computer
processing. Unicode provides a consistent way of encoding multilingual plain text making it
easier to exchange text files internationally.
ASCII defines 128 characters, which map to the numbers 0–127. Unicode defines (less than)
2^21 characters, which, similarly, map to numbers 0–2^21
The Unicode Standard provides a unique number for every character, no matter what
platform, device, application or language.

8.What is wrapper class?


The wrapper class in Java provides the mechanism to convert primitive into object and
object
into primitive.
The automatic conversion of primitive into an object is known as autoboxing and vice-versa
unboxing.
Eg: int a=20;
Integer i=Integer.valueOf(a);//converting int into Integer explicitly
Integer j=a;//autoboxing, now compiler will write Integer.valueOf(a) internally.

Q9. What is thread in java?


A thread is a thread of execution in a program. The Java Virtual Machine allows an
application to have multiple threads of execution running concurrently.
Every thread has a priority. Threads with higher priority are executed in preference to threads
with lower priority. Each thread may or may not also be marked as a daemon. When code
running in some thread creates a new Thread object, the new thread has its priority initially set
equal to the priority of the creating thread, and is a daemon thread if and only if the creating
thread is a daemon.
2types of threads in java
■Daemon thread in Java is a low-priority thread that runs in the background to perform tasks
such as garbage collection. Daemon thread in Java is also a service provider thread that
provides services to the user thread.
■User Thread in java
User threads are also known as non-daemon threads. The user thread is a thread which runs in
the foreground. In case of User Thread, JVM quits an application when all users threads are
completed.

10.What is JIT?
The Just-In-Time (JIT) compiler is a component of the Java™ Runtime Environment that
improves the performance of Java applications at run time. Java programs consists of classes,
which contain platform-neutral bytecodes that can be interpreted by a JVM on many different
computer architectures.

You might also like