Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Class notes

Class notes TCS 408 (JAVA PROGRAMMING) ZERO TO HERO

Rating
-
Sold
-
Pages
79
Uploaded on
10-12-2024
Written in
2023/2024

Master Java programming with this meticulously organized and detailed document! Whether you’re preparing for exams, working on assignments, or gearing up for technical interviews, these notes are your ultimate companion. Covering everything from the basics of Java syntax to advanced topics like multithreading, collections, and design patterns.

Show more Read less
Institution
Course

Content preview

Java programming
What is Java?
Java is a programming language and a platform. Java is a high level,
robust, object-oriented and secure programming language.

Java was developed by Sun Microsystems (which is now the subsidiary of
Oracle) in the year 1995. James Gosling is known as the father of Java.

Platform: Any hardware or software environment in which a program runs,
is known as a platform. Since Java has a runtime environment (JRE) and
API, it is called a platform.

Application
1. Desktop Applications such as acrobat reader, media player, antivirus,
etc.
2. Web Applications such as irctc.co.in, javatpoint.com, etc.
3. Enterprise Applications such as banking applications.
4. Mobile
5. Embedded System
6. Smart Card
7. Robotics
8. Games, etc.

Features of Java
Simple

Java is very easy to learn, and its syntax is simple, clean and easy to
understand. According to Sun Microsystem, Java language is a simple
programming language because:

o Java syntax is based on C++ (so easier for programmers to learn it after
C++).


1|Page

, o Java has removed many complicated and rarely-used features, for
example, explicit pointers, operator overloading, etc.
o There is no need to remove unreferenced objects because there is an
Automatic Garbage Collection in Java.

Object-oriented

Java is an object-oriented programming language. Everything in Java is an
object. Object-oriented means we organize our software as a combination of
different types of objects that incorporate both data and behaviour.

Platform Independent




Java is platform independent because it is different from other languages
like C, C++, etc. which are compiled into platform specific machines while
Java is a write once, run anywhere language. A platform is the hardware or
software environment in which a program runs.

Secured

Java is best known for its security. With Java, we can develop virus-free
systems. Java is secured because:



o No explicit pointer
o Java Programs run inside a virtual machine sandbox

Robust

The English mining of Robust is strong. Java is robust because:

2|Page

, o It uses strong memory management.
o There is a lack of pointers that avoids security problems.
o Java provides automatic garbage collection which runs on the Java
Virtual Machine to get rid of objects which are not being used by a Java
application anymore.

Architecture-natural

Java is architecture natural because there are no implementation dependent
features, for example, the size of primitive types is fixed.

Portable

Java is portable because it facilitates you to carry the Java bytecode to any
platform. It doesn't require any implementation.

High-performance

Java is faster than other traditional interpreted programming languages
because Java bytecode is "close" to native code.

Distributed

Java is distributed because it facilitates users to create distributed
applications in Java.

Multi-threaded

A thread is like a separate program, executing concurrently. We can write
Java programs that deal with many tasks at once by defining multiple
threads.

Dynamic

Java is a dynamic language. It supports the dynamic loading of classes. It
means classes are loaded on demand. It also supports functions from its
native languages, i.e., C and C++.




3|Page

, First Java Program
o class keyword is used to declare a class in Java.
o public keyword is an access modifier that represents visibility. It
means it is visible to all.
o static is a keyword. If we declare any method as static, it is known as
the static method. The core advantage of the static method is that there
is no need to create an object to invoke the static method. The main()
method is executed by the JVM, so it doesn't require creating an object
to invoke the main() method. So, it saves memory.
o void is the return type of the method. It means it doesn't return any
value.
o main represents the starting point of the program.
o String[] args or String args[] is used for command line argument.
o System.out.println() is used to print statement. Here, System is a
class, out is an object of the PrintStream class, println() is a method of
the PrintStream class.

What happens at runtime?
At runtime, the following steps are performed:




4|Page

Written for

Institution
Course

Document information

Uploaded on
December 10, 2024
Number of pages
79
Written in
2023/2024
Type
Class notes
Professor(s)
Akash
Contains
All classes

Subjects

$40.99
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
yashipant03

Get to know the seller

Seller avatar
yashipant03 Graphic Era
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
1 year
Number of followers
0
Documents
1
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions