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

Java Notes: Java Notes by Ajit Sir... Jspiders/Qspiders BTM Contact: 9980500900

Java is a high-level, object-oriented programming language developed by James Gosling at Sun Microsystems in 1996. It is a platform-independent language that can be used to create a variety of applications including desktop programs, web applications, enterprise applications, mobile apps, and games. Key features of Java include being simple, robust, high-performance, portable, and object-oriented using concepts like classes, objects, inheritance, polymorphism, abstraction, and encapsulation. The Java Development Kit (JDK) contains the Java compiler and Java Runtime Environment (JRE), which includes the Java Virtual Machine (JVM) to execute Java programs on different platforms.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2K views

Java Notes: Java Notes by Ajit Sir... Jspiders/Qspiders BTM Contact: 9980500900

Java is a high-level, object-oriented programming language developed by James Gosling at Sun Microsystems in 1996. It is a platform-independent language that can be used to create a variety of applications including desktop programs, web applications, enterprise applications, mobile apps, and games. Key features of Java include being simple, robust, high-performance, portable, and object-oriented using concepts like classes, objects, inheritance, polymorphism, abstraction, and encapsulation. The Java Development Kit (JDK) contains the Java compiler and Java Runtime Environment (JRE), which includes the Java Virtual Machine (JVM) to execute Java programs on different platforms.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Java Notes Java notes by Ajit Sir...

Jspiders/Qspiders Btm
Contact : 9980500900
--------------------------------------------------------------------------------------------------------------
What is a platform ?
→ Any software or hardware environment where a program runs is called a platform.

What is a software ?
→ It is a set of instructions or a program.
→ It is an automated solution to a real world challenges or problems.

What is a program ?
→ Program is a set of instructions or code.

What is programming language ?


→ It is a language using which a software can be developed.

What is Java ?
→ Java is a high level object oriented programming language.

What are the applications that can be developed using java ?


→ Desktop applications( Media player, antivirus etc)
→ Web Applications (eg : Facebook, irctc.com)
→ Enterprise Applications (eg : banking application)
→ Mobiles
→ Games etc

Who developed Java ?


→ Java was developed by James Gosling in 1996. (JDK version - 1.0) (JDK - Java
Development Kit)
→ The latest version of JDK is 11.
→ It was developed by Sun Microsystem and now it is overtaken by Oracle corporation.

Why the language name is Java ?


→ Java is the name of an island in Indonesia, where coffee was first produced. They have
given the Java name in the name of that island.

What are the features of Java ?


→ Simple :-- it is very simple to learn and implement
→ Robust - Strong
→ High Performance
→ Portable
→ Object Oriented :
→ Everything in java is an object.
→ Few concepts of OOPs (Object Oriented Programming ) are below.
→ Class
→ Object
→ Inheritance
→ Polymorphism
→ Abstraction
→ Encapsulation
→ Multi Threaded
→​ Platform Independent : Why java is platform independent ?
→ ​Java is a platform independent,​ because once we write java program, we can execute it
in any platform. (WORA -- Write Once, Run Anywhere). Java code will be compiled into
bytecode (.class file ) by the compiler and these byte code is platform independent. Means :
it can be executed in any specific platform provided we have a platform specific Java
runtime environment.

Note : JRE of windows system will be different from JRE of MAC system.

Difference between C++ and Java ? No


→ Java is platform independent whereas C++ is not.
→ Java does not support Multiple Inheritance with classes but C++ supports.

What is JDK, JRE and JVM ?


→ JDK contains both compiler (javac) and Java RunTime environment ​(JRE)​.
→ JDK is a java development kit which is used to develop an application.
→ JRE further contains Java Virtual Machine (JVM) and a few other resource
→ JRE is the physical implementation of JVM and it provides a runtime
environment to execute the java programs.
→ JRE is platform dependent. Windows JRE is different from MAC JRE.
→ JVM stands for Java Virtual Machine. It is the specification of JRE.
→ JVM is responsible to convert the byte code in to system specific
instructions.
-------------------------------
Q : How do you install Java in your system ?

JDK Installation Steps : no


1. Go to this url..
https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.ht
ml
2. Select radio button -- Accept Licence Agreement
3. You can see the file downloaded in download folder.
4. Double click on the .exe file and click on Next , next till finish.
5. Verify that JDK is installed successfully in the below location
C:\Program Files\Java\jdk1.8.0_144\bin

Question : What is the shortcut to verify that JAVA is installed in your system ?

Ans : Open command Prompt and hit this command.


Java -version
Check below snapshot:
Download Eclipse Editor and to launch it, set the jdk path in system environment variable.

Question : How to set the path of JDK in System environment variable?


Answer :
Right click on Computer à click on Properties à click on Advanced System Settings à Under
Advanced Tab ( this tab is selected by default), click on Environmental Variables à Under
System variable section, select path (Variable name) and click on EDIT
In Variable Value textbox, go to the end, add a semicolon and copy and paste the below
path.
C:\Program Files\Java\jdk1.8.0_144\bin

----------------------------------------------
How to create a JAVA project ?
1. Launch eclipse
2. File → New → Java Project
Enter a project name as shown below and click on Finish button.
How to create a package under SRC folder ?
Right click on src → new → package
Enter a package name and click on Finish as shown below.
How to create a class ?
Right Click on the package → new → class
In the below window, enter a project name, select the checkbox – public static void
main(Strings[] args) and click on Finish button.
It will create a class as shown below.
Where do we see the compiled .class file ?
Ans :
Under Navigator window pane → under the project → bin folder → package --> class file is
present as shown below.
------------------------------------------------------------------------
Question : What is a Class ?

→ A class is a blueprint of a plan or a design.


→ It is a logical entity which can’t be touched or experienced. It doesn’t have any physical
existence.

Question : What is an Object ?


→ Object is a physical entity which can be touched or experienced.
→ Object is also called as an instance of a class.
→ Object can be created out of a class.
→ Multiple objects can be created out a same class, we call these objects as identical
objects or similar objects.

Association :

You might also like