Professional Documents
Culture Documents
Gaurav Internship
Gaurav Internship
A report submitted in partial fulfillment of the requirements for the Award of Degree of
BACHELOR OF TECHNOLOGY
In
Mechanical Engineering
By
Tejas Santosh More
PRN No. : 1920000620
Under Supervision of
Prof. K.B. Kolhapure
04/04/2022 to 30/06/2022
Aurangabad
(2021- 2022)
1
Submitted By
(Mechanical Engineering)
Guided By
Aurangabad
(2021- 2022)
2
CERTIFICATE
Submitted by
In partial fulfillment of
In
Mechanical Engineering
For the academic Year 2021-22
4
Acknowledgement
It is my foremost duty to express my deep sense of gratitude and respect to the guide Prof.
K.B.Kolhapure his uplifting tendency and inspiring me for taking up this Internship completely
successful. I am also grateful to Prof. R.H.Shinde (H.O.D) and Dr. Ulhas Shiurkar (Director)
DIEMS for providing all necessary facilities to carry out the Internship work and those
encouraging part has been a perpetual source of inspiration.
I am also thankful to Mr. Ambarish Sir for proving me in-plant training in Capgemini,
Pune. Last but not least I am thankful to my colleagues and those help me directly or indirectly
through this Internship.
Thanking You.
5
DECLARATION
Place: Aurangabad
Date:
Guide
6
1. INTRODUCTION TO JAVA
JAVA was developed by James Gosling at Sun Microsystems Inc in the year 1995, later
acquired by Oracle Corporation. It is a simple programming language. Java makes writing,
compiling, and debugging programming easy. It helps to create reusable code and modular
programs.
After the name OAK, the team decided to give a new name to it and the suggested words
were Silk, Jolt, revolutionary, DNA, dynamic, etc. These all names were easy to spell and fun to
say, but they all wanted the name to reflect the essence of technology. In accordance with James
Gosling, Java the among the top names along with Silk, and since java was a unique name so most
of them preferred it.
Java is the name of an island in Indonesia where the first coffee (named java coffee) was
produced. And this name was chosen by James Gosling while having coffee near his office. Note
that Java is just a name, not an acronym.
7
1.2 HISTORY OF JAVA
In 1997, Sun Microsystems approached the ISO standards body and later formalized Java,
but it soon withdrew from the process. At one time, Sun made most of its Java implementations
available without charge, despite their proprietary software status. Sun generated revenue from
Java through the selling of licenses for specialized products such as the Java Enterprise System.
On November 13, 2006, Sun released much of its Java virtual machine as free, open-source
software. On May 8, 2007, Sun finished the process, making all of its JVM’s core code available
under open-source distribution terms.
The principles for creating java were simple, robust, secured, high performance, portable,
multi-threaded, interpreted, dynamic, etc. In 1995 Java was developed by James Gosling, who is
known as the Father of Java. Currently, Java is used in mobile devices, internet programming,
games, e-business, etc.
8
1.3 JAVA APPLICATIONS
1. Mobile Applications
The most popular Java application is a mobile application that is developed via the Android
operating system. Almost everyone uses mobile phones and uses several applications which are
developed in the Java programming language. For the development of mobile applications, Java
is the official or base programming language. It is compatible with mobile apps development
software such as Android Studio and Kotlin. As Java executes on JVM similarly, Android uses
Dalvik Virtual Machine (DVK) to execute class files, and then these Android files are bundled as
9
Android Application Package (APK). Because of Java and its OOPs concepts, it enables better
security and simplicity with Android.
2.Cloud-Based Applications
Cloud Computing has become so famous and has reduced the worries to carry documents
everywhere as it enables on-demand delivery of the IT resources that can be taken via internet and
include storage, databases and software. Just, one needs to pay a small amount which is known as
pay-as-you-go pricing model. Cloud Computing also provides IT infrastructure at a low cost, as
we can save files on remote databases and retrieve them on demand.
10
Due to such everlasting languages like Java and Scala, Big Data has gained great popularity. When
the Big Data application is developed using Java, Java becomes the backbone of it. And one might
be aware of the term Big Data that defines extremely big and complex datasets that may be
analyzed for extracting trends, patterns, and other useful information. Also, Scala (a powerful
programming language) is also based on Java programming language. The Scala codes are easily
convertible into bytecode and can be executed on the Java Virtual Machine. Hadoop and other
Apache frameworks use Java for executing some of its tasks.
4.Gaming Applications
Java is known as one of the best programming languages for building and developing games. A
best platforms for developing 2Dimensional games is Java. Today most of the population use
Androids, but before Android, on keypad phones as well Java 2-D games were available that were
also closely liked by the crowd, and at present, in Android phones, new and advanced Java games
are available. The games we play on Android mobiles can be built in Java only. One should also
know the reason for Android choosing Java as a primary language because Java language supports
the Dalvik Virtual Machine (DVM), which, like JVM, is used for executing Android programs.
11
2. Literature Review
Abstract
In this paper, I have done the Study of the Java programming language. Writing computer
programs is not a simple subject to be examined. Numerous understudies have learning issues
because of the idea of the subject. (Dr.Tejinder Singh1, May 2016) by far most work ondata
stream falls into two classes:
(1) dynamic,instrumentation-based methodologies, for example,corrupting,
(2) static, dialect basedmethodologies, for example, sort frameworks.
Introduction
This is the model of the learning Java programming Language for an understudy in a simple
way, it is following the means of learning Java Programming Language. There are 3 types of
methods are follows
JAVA Method -
1.Demo method
2.Development Method
3.Security Method
12
1.Demo Method
3.Security Method
In this day and age where PC organizing assumes a vital part in the regular day to day existence,
PC lawbreakers cause destruction in basic or vital system conditions. A typical criminal
exercise includes: tapping system movement, altering databases, adjusting sites crippling
administrations and data robbery.
13
3. JAVA MODULE/TRAINING MODULE
2 Object is a real world entity such as pen, Class is a group of similar objects.
laptop, mobile, bed, keyboard, mouse, chair
etc.
4 Object is created through new Class is declared using class keyword e.g.
keyword mainly e.g. class Student{}
Student s1=new Student();
14
3.2 REAL LIFE EXAMPLE OF CLASS AND OBJECT IN JAVA
1. Java Virtual Machine (JVM): This is generally referred to as JVM. There are three execution
phases of a program. They are written, compile and run the program. The compilation is done by
the JAVAC compiler which is a primary Java compiler included in the Java development kit
(JDK). It takes the Java program as input and generates bytecode as output. In the Running phase
of a program, JVM executes the bytecode generated by the compiler.
Now, we understood that the function of Java Virtual Machine is to execute the bytecode
produced by the compiler. Every Operating System has a different JVM but the output they
produce after the execution of bytecode is the same across all the operating systems. This is why
Java is known as a platform-independent language.
2. Bytecode in the Development process: As discussed, the Javac compiler of JDK compiles the
java source code into bytecode so that it can be executed by JVM. It is saved as .class file by the
compiler. To view the bytecode, a disassembler like javap can be used.
15
3. Java Development Kit (JDK): While we were using the term JDK when we learn about
bytecode and JVM. So, as the name suggests, it is a complete Java development kit that includes
everything including compiler, Java Runtime Environment (JRE), java debuggers, java docs, etc.
For the program to execute in java, we need to install JDK on our computer in order to create,
compile and run the java program.
4. Java Runtime Environment (JRE): JDK includes JRE. JRE installation on our computers
allows the java program to run, however, we cannot compile it. JRE includes a browser, JVM,
applet supports, and plugins. For running the java program, a computer needs JRE.
5. Garbage Collector: In Java, programmers can’t delete the objects. To delete or recollect that
memory JVM has a program called Garbage Collector.
Garbage Collectors can recollect the objects that are not referenced. So Java makes the life
of a programmer easy by handling memory management. However, programmers should be
careful about their code whether they are using objects that have been used for a long time. Because
Garbage cannot recover the memory of objects being referenced.
6. Class Path: The class path is the file path where the java runtime and Java compiler look for
.class files to load. By default, JDK provides many libraries. If you want to include external
libraries, they should be added to the class path.
16
3.4 FEATURES OF JAVA
The primary objective of Java programming language creation was to make it portable,
simple and secure programming language. Apart from this, there are also some excellent features
which play an important role in the popularity of this language. The features of Java are also known
as Java buzzwords.
1. Simple
2. Object-Oriented
3. Portable
4. Platform independent
5. Secured
6. Robust
7. Architecture neutral
8. Interpreted
9. High Performance
10. Multithreaded
11. Distributed
12. Dynamic
17
FIG 3.1 : FEATURES OF JAVA
1. 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++).
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.
18
2. Object-oriented
1. Object
2. Class
3. Inheritance
4. Polymorphism
5. Abstraction
6. Encapsulation
3. 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.
19
FIG 3.2 : OPERATING SYSTEM
There are two types of platforms software-based and hardware-based. Java provides a software-
based platform.
The Java platform differs from most other platforms in the sense that it is a software-based platform
that runs on top of other hardware-based platforms. It has two components:
1. Runtime Environment
2. API (Application Programming Interface)
Java code can be executed on multiple platforms, for example, Windows, Linux, Sun Solaris,
Mac/OS, etc. Java 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).
20
3. 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
o Classloader: Classloader in Java is a part of the Java Runtime Environment (JRE) which
is used to load Java classes into the Java Virtual Machine dynamically. It adds security by
separating the package for the classes of the local file system from those that are imported
from network sources.
o Bytecode Verifier: It checks the code fragments for illegal code that can violate access
rights to objects.
o Security Manager: It determines what resources a class can access such as reading and
writing to the local disk.
Java language provides these securities by default. Some security can also be provided by an
application developer explicitly through SSL, JAAS, Cryptography, etc.
21
4. Robust
5. Architecture-neutral
o Java is architecture neutral because there are no implementation dependent features, for
example, the size of primitive types is fixed.
o In C programming, int data type occupies 2 bytes of memory for 32-bit architecture and 4
bytes of memory for 64-bit architecture. However, it occupies 4 bytes of memory for both
32 and 64-bit architectures in Java.
6. Portable
o Java is portable because it facilitates you to carry the Java bytecode to any platform. It
doesn't require any implementation.
7. High-performance
o Java is faster than other traditional interpreted programming languages because Java
bytecode is "close" to native code. It is still a little bit slower than a compiled language
(e.g., C++). Java is an interpreted language that is why it is slower than compiled
languages, e.g., C, C++, etc.
22
8. Distributed
o Java is distributed because it facilitates users to create distributed applications in Java. RMI
and EJB are used for creating distributed applications. This feature of Java makes us able
to access files by calling the methods from any machine on the internet.
9. Multi-threaded
o 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. The main advantage of
multi-threading is that it doesn't occupy memory for each thread. It shares a common
memory area. Threads are important for multi-media, Web applications, etc.
10. 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++.
Java supports dynamic compilation and automatic memory management (garbage collection).
23
4. CASE STUDY -- JAVA CODES
OUTPUT :
Hello Java
24
4.2 SYNTAX
1. Comments: Comments are used for explaining code and are used in a similar manner in Java
or C or C++. Compilers ignore the comment entries and do not execute them. Comments can be
of a single line or multiple lines.
Multi-line comments:
Syntax:
2. import java.io.* : This means all the classes of io package can be imported. Java io package
provides a set of input and output streams for reading and writing data to files or other input or
output sources.
11.Class : The class contains the data and methods to be used in the program. Methods define the
behavior of the class. Class main has only one method Main in JAVA.
12.static void Main() : static keyword tells us that this method is accessible without instantiating
the class.
13.Void : keywords tell that this method will not return anything. The main() method is the entry
point of our application.
25
6. System.in : This is the standard input stream that is used to read characters from the keyboard
or any other standard input device.
7. System.out : This is the standard output stream that is used to produce the result of a program
on an output device like the computer screen.
8. println() : This method in Java is also used to display text on the console. It prints the text on
the console and the cursor moves to the start of the next line at the console. The next printing takes
place from the next line.
9. String []args : This is the argument passed to the main function which is an array of strings
with the array name args. One can choose their own flexible name but this name is used by many
developers
26
4.3 BANK APP
Source Code :
27
Main Code :
Output :
28
4.4 TABLE PRINT
Source Code :
29
Output :
30
4.5 POWER CALCULATOR
Source Code :
31
Output :
32
5.CONCLUSION
33
6.REFERENCES
34