0% found this document useful (0 votes)
8 views

1.Intro_Java

The document provides an overview of programming languages, focusing on C, C++, and Java, highlighting their characteristics and differences. It explains the concepts of platform-dependent and platform-independent languages, detailing how Java achieves platform independence through the Java Virtual Machine (JVM). Additionally, it distinguishes between JDK, JRE, and JVM, and compares .exe files with .class files in terms of execution and security.

Uploaded by

G.Chandra Shekar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

1.Intro_Java

The document provides an overview of programming languages, focusing on C, C++, and Java, highlighting their characteristics and differences. It explains the concepts of platform-dependent and platform-independent languages, detailing how Java achieves platform independence through the Java Virtual Machine (JVM). Additionally, it distinguishes between JDK, JRE, and JVM, and compares .exe files with .class files in terms of execution and security.

Uploaded by

G.Chandra Shekar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

SSSIT Computer Education

Besides R.S.Brothers Show Room


KPHB-Hyderabad. Java Online Training
Java
Languages are used to communicate in system in order to construct the programming
structure

C language is procedure oriented programming language. in the procedure oriented


programming language the logics will be maintained and manipulated in the form of
functions

C++ object oriented programming language. in the object oriented programming


language the logic will be maintained and manipulate in the form of class and object.

the C and C++ called conventional programming languages which are meant for
developing standalone application

Standalone application is one which runs in the context of local hard disk and would
results are not globally shareable or standalone application is one which is accessed by
a single user at a time or and application whose execution starts with me

Java
Java is a technology, which provides platform, language and API [ application
programming interface ]

Platform
it is a program which provides Runtime environment for executing an application.

Application is combination of both functional part as well as structural part, where


functional part is nothing but the parts where the end user can perform some action,
whereas structural part is nothing but logic which is the written by for the point of
functional

Examples for platforms are operating system and Java

Operating system is acts as a platform, for the applications which are developed by
using conventional programming language like C and C ++

Java [JRE] is acting as a platform application which are developed by using Java
language [JDK].

Based on then the platforms languages are classified into two categories
1. Platform dependent programming language
2. Platform independent programming languages

1|Page
SSSIT Computer Education
Besides R.S.Brothers Show Room
KPHB-Hyderabad. Java Online Training
Java
If we develop any application using a language on a particular operating system,
If that application compiles and executed only on the same operating system known as
a platform dependent similarly if that application is compiled and executed not only on
the same operating system and also executes which are the operating systems then it is
known as platform independent.

Note : C and C++ are platform dependent just because of linker whereas Java is a
platform independent just because of JVM.

C and C++ platform dependent :


1. after writing any source code in C language, it is our responsibility to make the
program machine understandable through compilation process.After compilation the C
compiler will create object code.

2. object code is taken by the linker it will create an executable file with respect to today
local operating system

3. the executable file contents not only executable statements and also OS instructions.If
you are trying to execute the executable file in the different operating system then and
that application want to be executed just because of changing the OS instructions, that's
why C and C ++ platform dependent

Java is platform independent


1. after writing any Java source code, it is our responsibility to make the program
machine understandable using through compilation process.

2. soon after compiling the Java source code then Java compiler will create compiled
code of Java language, called bytecode

3. Byte codes cannot be understand executed directly by the operating system rather
they are executed by the virtual machine called JVM provided by the Jaya

4. the compile code of Java language byte will be executed on JVM which is
resided on the top of operating system,Thats way Java is called platform independent

Java language
1. Java is the pure object oriented programming language

2. in the object oriented programming language the data and corresponding functions
are closely bind together as a single unit which is technically called encapsulation,
practically possible by using keyword class

2|Page
SSSIT Computer Education
Besides R.S.Brothers Show Room
KPHB-Hyderabad. Java Online Training
Java
3. The data which is taken within the bound the data can be accessed by the functions
which are existed in The Bound. The data cannot be access outside of The Boud, this
type of data restrictions are called data abstraction which is practically possible by
using access modifiers [private, default, protected and public keywords]

4. If we make any changes in the data exist in the bound, that will be reflected only the
functions which are exist in the bound, here we can provide data restrictions does we
can improve the security

what is the difference between C + + and Java

C ++:
1. it is a partial object oriented programming language
a. in the partial object oriented programming, we can write, compile and execute the
programs with or without a class
b. in partial object orientation main logic is isolated from class logic
c it is breaking the rules of the security through friend function. here we can also access
the Secure data outside of the class

2.In C++ we can develop stand alone application


3. These applications are platform dependent

Java:
1. It is a pure object oriented programming language
a.In pure oops None of the program executed without class
b. the main logic is encapsulated within the class
c. it is providing tight security
2. we can develop wide range of applications
3. these applications are platform independent

What is the difference between JDK, JRE and JVM?


JDK Java development kit, which provides an environment for writing, compilation and
execute in the program

JDK is nothing but JRE and development tools

JRE Java Runtime environment, any an environments for executing an application


JRE is nothing but JVM and Class Libraries

JVM :Java Virtual Machine used for executing java compiled code bytecode.

What is the difference between .exe and .Class Files ?

3|Page
SSSIT Computer Education
Besides R.S.Brothers Show Room
KPHB-Hyderabad. Java Online Training
Java
1. exe files generated by traditional compilers c and c++
2.exe file are executed directly by the operating system
3.exe files are existed with both os instructions and executable statements
4. Mostly affected by the virus thus it is not safety

.Class Files
1. These are created by Java compiler
2. It contains bytecode
3. These are executed by the JVM not by the operating system
4. These are not affected by virus thus these files are more secure

API application programming interface, it provides rich set of classes and methods
,which are used to build any type of powerful applications simple and easy

4|Page

You might also like