Q. Explain the best way how to set java path?
Ans:- Just go to Start-Run-Cmd
Your Command Prompt will open.
copy path of your "javac.exe " simply at location --> C:\Program Files\Java\jdk1.8.0_25\bin
and type command in dos prompt
set path="C:\Program Files\Java\jdk1.8.0_25\bin"
e.g.
Q. Explain the Types of Java Applications.
Simple
Object-oriented
Platform
Independent
Secured
Portable
High-performance
Distributed
Ans:- Just go to Start-Run-Cmd
Your Command Prompt will open.
copy path of your "javac.exe " simply at location --> C:\Program Files\Java\jdk1.8.0_25\bin
and type command in dos prompt
set path="C:\Program Files\Java\jdk1.8.0_25\bin"
e.g.
This is one of the simple way for beginners to set the java path(Most of freshers face trouble to set java path).
Q. Explain the Types of Java Applications.
Ans:- In Java we can build following types of
applications:
Desktop/Standalone Application
In Java we can build the desktop applications or windows
based applications, which are installed on single or stand along computer such
as Media Player, Calculator, Antivirus etc using Swing and AWT.
Web Application
In Java using servlet, jsp, structs, jsf etc. we
can build the server side application and dynamic web pages.
Enterprise/Distributed Application
Using EJB in Java we can build the application
which are distributed in nature such as railway, airlines, banking application
etc. In these application we need high level security, load balancing
clustering etc.
Mobile Application
To build the Mobile application we use the
Android and Java ME of Java
Q. Explain the Features of Java
Ans: -
Features of Java is explain below:
Simple
According
to Sun Microsystems Java language is simple language because of following
factors:-
|
Syntax
of Java is based on C++ , so who knows about C++ it is easy to learn.
|
Removed
many confusing and/or rarely-used features e.g., explicit pointers, operator
overloading etc.
|
Java
has the automatically Garbage Collection So there is no need to remove
unreferenced objects.
|
Object-oriented
Java
is a Object Oriented language means we organize our software as a combination
of different types of objects that incorporates both data and behavior. OOPs
is a methodology that simplify the software development and maintenance by
providing some advance features.
|
Basic
concepts of OOPs are:
|
1. Object
2. Class
3. Inheritance
4. Polymorphism
5. Abstraction
6. Encapsulation
|
Platform
Independent
Java is a platform
independent language. A platform is the hardware or software environment in which a
program runs. There are two types of platforms software-based and
hardware-based. Java provides software-based platform. Platform of Java differs from most other platforms in
the sense that it's a software-based platform that runs on top of other
hardware-based platforms. Java Platform has two components:
1. Runtime
Environment
2. API(Application
Programming Interface)
|
Java language
code can be run on multiple platforms e.g.Windows, Linux, Sun Solaris, Mac/OS
etc. We just have to install JVM on Operating System where we want to execute
Java Program. Java language code is compiled by the compiler and converted
into bytecode. This bytecode is a platform independent code because it can be
run on multiple platforms i.e. Write Once and Run Anywhere(WORA). So we found
that Java is a Platform Independent Language.
|
Secured
Java
is secured Language because there is no explicit pointer and the programs of
Java run inside Virtual machine (JVM) sandbox. Developers can also increase
the security by using SSL, JAAs and cryptography etc.
|
Architecture-neutral |
In Java
there is no implementation dependent features for e.g. size of primitive
types is set.
Multi-threaded
In Java we can build the multi threaded applications. A thread is a mini process or like a separate program, executing concurrently. We can write Java programs that deal with many tasks at a time. There are many advantages of multi-threading for e.g. Multi Threaded applications can shares the same memory and resources. Threads are important for multi-media, Web applications, Games etc.
|
Portable
Java
is Portable language because we can move the Java byte Code from one machine
or platform to another machine or platform.
|
High-performance
Java
is a High performance language then C, C++ etc. because of Byte Code and
other features.
|
Distributed
In
Java we can build distributed applications which can run on multiple machine simultaneously.
RMI and EJB are used for creating
distributed applications. In Java we may access files and other resources by
calling the methods from any machine connected to network or internet.
|
Robust
Java is Robust in nature, Robust means strong and Java uses strong memory management strategy. Because there is no pointers, automatic garbage collection, exception handling, type check mechanism etc are the features of Java which make it Robust.
|
No comments:
Post a Comment