Java Report
Java Report
Java Report
An Internship Report on
CORE JAVA
Submitted in partial fulfilment of requirement for the III & IV semester
Bachelor of Engineering in ELECTRONICS and
COMMUNICATION Engineering Submitted By
PRASHANTH A-[1CK21EC023]
Under the guidance of
CERTIFICATE
This is Certified that the internship report entitled with “CORE JAVA” is a Bonafede work
carried out by PRASHANTH A bearing the university seat number 1CK21EC023 partial
fulfilment for the award of Bachelor of Engineering in Computer Science &Engineering of
the Visvesvaraya Technological University, Belagavi during the year 2022-2023.It is
certified that all corrections/suggestions indicated for the internal assessment have been
incorporated in the internship report. The internship report has been approved as it satisfies
the academic requirements in respect of internship report prescribed for the IV semester
Bachelor of Engineering Degree.
The word Core describes the basic concept of something, and here, the phrase 'Core Java'
defines the basic Java that covers the basic concept of Java programming language. We all are
aware that Java is one of the well-known and widely used programming languages, and to
begin with it, the beginner has to start the journey with Core Java and then towards the
Advance Java. The Java programming language is a general-purpose programming language
that is based on the OOPs concept. The ocean of Java is too deep to learn, i.e., as much you
learn more, you will know its depth. Java is a platform-independent and robust programming
language. The principle followed by Java is WORA that says Write Once, Run Anywhere.
The programming language is quite simple and easy to understand. But one should know that
Core Java is not different from Java. Java is complete in itself, but for the beginners, it is
natural that the beginner must begin with the core concepts of Java. In actual, Java has
different editions, where Core Java is one of the parts of an edition.
i
DECLARATION
[PRASHANTH A]-[1CK21EC023]
ii
ACKNOWLEDGEMENT
The completion of any work is a showcase of constant dedication and co-operation of many
people who lent their hands which went seen or unseen.
We would like to thank our beloved Principal Dr. APRAMEYAN S, CBIT for his kind
disposition for completing this undertaking successfully.
We also thank to all our professors and the entire department of ELECTRONICS &
COMMUNICATION Engineering for their co-operation and suggestions.
The report would be incomplete if I do not thank our parents and friends for their continuous
encouragement and moral support.
[PRASHANTH A]-[1CK21EC023]
iii
TABLE OF CONTENTS
ASBTRACT i
DECLARATION ii
ACKNOWLEDGMWNT iii
TABLE OF CONTENTS iv
LIST OF FIGURES v
1 INTRODUCTION TO COMPANY
1.1 Introduction 1
1.2 Vision 1
1.3 Services 2
2 ABOUT PROJECT
3 CODE
3.1 Code 18
3.2 Result 20
4 FUTURE ENHANCEMENT 23
iv
LIST OF FIGURES
1 Progoton logo 3
v
CHAPTER 1
INTRODUCTION TO COMPANY
1.1 Introduction
1.2 Vision
“To be the most innovative Software Services, Consulting and Development Company,
and to be a committed partners of our Customers and Representatives.” Progton is on a mission
to accelerate the business of our customers by embracing the idea of quality and speed to deliver
innovative solutions. We do this with the help of our exceptionally.
1
CORE JAVA INTRODUCTION
where we encourage them to innovate, explore, automate and take ownership of their own
and company’s growth both technically and professionally. This is possible because of our
open work environment and culture that encourages a clear focus on delivering high-quality
software solutions with the highest level of customer satisfaction.
1.3 Services
Web development
UI / UX Designing
Cloud Devops
Digital Marketing
AI / ML Services
Data Services
1.4 Culture and values
Trust in God
Customer First
Mentor Based
Knowledge Sharing
Grow Together
Teamwork
Passion
Innovation
Requirement Analysis:
We compile all the data obtained from our customers and carry out a complete
analysis to find possibilities in existing business processes, to take into account the current
processes and technologies of our customers and how they can interact with future design.
And how we can deliver faster thereby minimizing the lead time to market.
Designing:
Architecture:
Our process of software design and architecture is usually separated into four views:
conceptual, module, execution, and code. This separation is based on our study of the
software architectures of large systems, and on our experience designing and reviewing
software architectures. We architect the solution as per the requirements & design so that the
application supports all the requirements and is easy to scale. We provide a project plan
focused on compliance guidelines and best practices in the industry, using change
management to ensure adequate management, efficient communication, and contingency
planning.
Development:
Staging Release:
We enable a staging environment for the initial release to make sure the application
is coming up as we planned. Here we test and rigorously roll out features so that the
application is tested with all criteria’s, bug -free and make sure we achieve the business
needs. And make the application Production ready.
Quality Assurance:
Our Quality Assurance covers the entire process of the development cycle with both
Functional testing and Non-Functional testing to make sure that a product has met its
specification in the topmost qualitypossible along with the business requirements ofthe client.
ABOUT PROJECT
2.1.1 Application:
According to Sun, 3 billion devices run Java. There are many devices
where Java is currently used. Some of them are as follows:
1. Desktop Applications such as acrobat reader, media player, antivirus, etc.
4. Mobile
5. Embedded System
6. Smart Card
7. Robotics
8. Games, etc.
2.1.2 Types of Java Applications:
There are mainly 4 types of applications that can be created using Java programming:
1. Standalone Application
5
CORE JAVA DESCRIPTION TO PROJECT
applications. These are traditional software that we need to install on every machine.
Examples of standalone application are Media player, antivirus, etc. AWT and Swing are
used in Java for creating standalone applications.
2. Web Application
An application that runs on the server side and creates a dynamic page is called a web
application. Currently, Servlet, JSP, Struts, Spring, Hibernate, JSF, etc. technologies are
used for creating web applications in Java.
3. Enterprise Application
The Java platform and language began as an internal project at Sun Microsystems
in December 1990, providing an alternative to the C++/C programming languages. Engineer
Patrick Naughton had become increasingly frustrated with the state of Sun's C++ and C
application programming interfaces (APIs) and tools. While considering moving to NeXT,
Naughton was offered a chance to work on new technology and thus the Stealth Project was
started.
The Stealth Project was soon renamed to the Green Project with James Gosling
and Mike Sheridan joining Naughton. Together with other engineers, they began work in a
small office on Sand Hill Road in Menlo Park, California. They were attempting to develop
a new technology for programming next generation smart appliances, which Sun expected
to be a major new opportunity. The team originally considered using C++, but it was rejected
for several reasons. Because they were developing an embedded system with limited
resources, they decided that C++ needed too much memory and that its complexity led to
developer errors. The language's lack of garbage collection meant that programmers had to
to manually manage system memory, a challenging and error- prone task. The team was also
troubled by the language's lack of portable facilities for security, distributed programming,
and threading. Finally, they wanted a platform that could be easily ported to all types of
devices.
Bill Joy had envisioned a new language combining Mesa and C. In a paper called
Further, he proposed to Sun that its engineers should produce an object-oriented environment
based on C++. Initially, Gosling attempted to modify and extend C++ (that he referred to as
"C++ ++ --") but soon abandoned that in favor of creating a new language, which he called
Oak, after the tree that stood just outside his office. By the summer of 1992, they were able to
demonstrate portions of the new platform including the Green OS, the Oak language, the
libraries, and the hardware. Their first attempt, demonstrated on September 3, 1992, focused
on building a personal digital assistant (PDA) device named Star7 that had a graphical
interface and a smart agent called "Duke to assist the user.
Java is simple, easy to design, easy to write, and therefore easy to compile, debug, and learn
than any other programming languages.
Java is object-oriented, that is used to build modular programs and reusable code in other
application.
Java is platform-independent and flexible in nature. The most significant feature of Java is
to run a program easily from one computer system to another.
● Java is secure. The Java language, compiler, interpreter and runtime environment are
securable.
● Java is robust. Robust means reliability. Java emphasis on checking for possible errors, as
Java compilers are able to detect many errors problem in program during the execution of
respective program code.
● Java supports multithreaded. Multithreaded is the path of execution for a program to perform
several tasks simultaneously within a program. The java come with the concept of
Multithreaded Program. In other languages, operating system-specific procedures have to
becalled in order to work on multithreading.
● Java defines eight simple (or elemental) types ofdata: byte, short, int, long, char, float, double,
and Boolean.
If you have previous programming experience, then you already know that it is fairly
common to assign a value of one type to a variable of another type. If the two types are
compatible, then Java will perform the conversion automatic ally. For example, it is always
possible to assign an int value to a long variable. However, not all types are compatible, and
thus, not all type conversion ns are implicitly allowed. For instance, there is no conversion
defined from double to byte. To do so, you must use a cast, which performs an explicit
conversion between incompatible types. Let's look at both automatic type conversions and
casting.
Multiple threads in process execute same program also known as lightweight process.
2.2.1Prerequisites
Basic knowledge of Java programming concepts
Java Development Kit (JDK) installed
1. Java Developer
The future of Java programming language is Java Developers. Working on mobile
applications to middleware, the future of Java developers is evolving. Java developers must
be aware of Core Java, Spring, JavaScript, HTML, CSS, Database and another Client-side
programming. Courses are available at leading IT academies like Logic Rays Academy,
Ahmedabad where you can get career opportunities like web developer, tester, graphic
designer, application developer, Software developer, or even a professional teacher in
JAVA.
2. DevOps Engineer
The profession of a Devop Engineer requires applying several practices of DevOps
and Java app development concepts. You will be the people-first approach as continuous
integration will be a part of the work. The use of microservices instead of monolithic Java
applications will be there.
3. Solution Architect
A Solution Architect creates a technical vision for a specific task of the organization’s
setback. As a problem solver, you will be in charge of designing, and managing the solution.
Depending upon the environment of the present and the technical aspects, the software
product is developed making a Solution Architect indispensable.
4. Mobile App Development
One of the promising Java career paths is being into Mobile App development.
Solving the challenges of tapping into the cloud for a better user experience is the core task
of this position. Every field finds a need for this career from retail to telecommunication,
healthcare, food industries, e-commerce, government organizations and others. Employers
need employees to develop mobile applications to suit their needs and generate revenue for
the business.
5. Java Web Development
If you are somebody with web technologies, aware of other frameworks, and can
create Java web projects, you are in for Java web development opportunities. The future of
Java developers in India is bright. Projects like Digital India saw their rise only due to Java
web development programmers. The technical know-how hence must be top-notch.
2.2.3 Java In the Next 10 Years
As one can see Java in the next 10 years, is already booming with the rise emergence of new
languages like Kotlin, Clojure, JavaScript, J Ruby, Ceylon and Scala. Java will be the
ultimate interface for various devices.
1. What is the scope of Java in future?
Java developers’ future scope is huge not only in India but also abroad. India’s IT
services outsourcing industry with heavy revenue generation is increasing
rapidly.
Java is popular in different domains like banking, retail, stock market, financial
services, big data, scientific and research community and other industries.
2. What are the industries using Java today?
The largest segments that use JAVA today are Computer Software and Information
Technology. The usage is in the healthcare industry, hospitality, tourism, education, food,
textile and other industries.
3. Is Java still in demand by 2022?
Java is evolving day in and out and is still in demand. This day the US has 44% of Java users
and the percentage is getting higher.
Salaries and Future of Java Developer in India
A fresher begins their salary up to 2 lacs p.a. The salary depends upon qualification,
expertise, and years of experience. The salary ranges anything from 5 lacs and above. If you
hold a master’ degree, expect a salary from 1.5 lac to 2. Lacs. Bachelor’s degree holders can
expect 1.10 lac to 1.25 lacs p.a. Employees with 8-12 years’ experience get 25 lacs.
Candidates with 16-20 years get 45 lacs.
To Sum Up the Future of Java
Integers:
This group includes byte, short, int, and long, which are for whole-valued signed
numbers. Floating-point numbers This group includes float and double, which represent
numbers with fractional precision. All of these are signed, positive and negative values. Java
does not support unsigned, positive -only integers. The width of an integer type should not
be thought of as the amount of storage it consumes, but rather as the behavior it defines for
variables and expressions of that type. The Java run-time environment is free to use whatever
size it wants, as long as the types behave as you declared them. In fact, at least one
implementation stores bytes and shorts as 32-bit (rather than 8- and 16-bit) values to improve
performance, because that is the word size of most computers currently in use. The width
and ranges of these integer types vary widely, as shown in this table:
Byte
The smallest integer type is byte. This is a signed 8-bit type that has a range from –128
to127. Variables of type byte are especially useful when you're working with a stream of
data from a network or file. They are also useful when you're working with raw binary data
that may not be directly compatible with Java's other built-in types. Byte variables are
declared by use of the byte keyword. For example, the following declares two-byte variables
called b and c: byte b, c;
Short
Short is a signed 16-bit type. It has a range from –32,768 to 32,767. It is probably the
least- used Java type, since it is defined as having its high byte first (called big-endian
format). This type is mostlyapplicable to 16 -bit computers, which are becoming increasingly
scarce. Here are some examples of short variabledeclarations:
Ex: short s;
Int
The most commonly used integer type is int. It is a signed 32-bit type that has a range. Its
range is from –2,147,483,648 to 2,147,483,647. Any time you have an integer expression
involving bytes, shorts, ints, and literal numbers, the entire expression is promoted to int
before the calculation is done.
Double
Double precision, as denoted by the double keyword, uses 64 bits to store a value. Double
precision is actually faster than single precision on some modern processors that have been
optimized for high -speed mathematical calculations. All transcendental math functions, such
as sin (), cos (), and sqrt (), return double values. When you need to maintain accuracy over
many iterative calculations, or are manipulating large –valued numbers, double is the best
choice
Characters
This group includes char, which represents symbols in a character set, like letters and
numbers. In Java, the data type used to store characters is char. Java uses Unicode to
represent characters. Unicode defines a fully international character set that can represent all
of the characters found in all human languages. In Java char is a 16-bit type. The range of a
char is 0 to 65,536. There are no negative chars. The standard set of characters known as
ASCII still ranges from 0 to 127 as always, and the extended 8-bit character set, ISO-Latin-
1, ranges from 0 to 255.
Boolean
This group includes Boolean, which is a special type for representing true/false values.
You can use these types as -is, or to construct arrays or your own class types. Thus, they form
the basis for all other types ofdata that you can create. Java has a simple type, called Boolean,
for logical values. It can have only one of two possible values, true or false. This is the type
returned by all relational operators, such as a < b. Boolean is also the type required by the
conditional expressions that govern the control statements such as if and for.
2.4.1 Introduction
Rock-Paper-Scissors is a game famous for being played by not only children, but people of
all ages. Here you will learn how to write a simple Java program to play the game against a
computer. Whether you are fairly new to programming or not, this presents a useful project
to either practice writing code or freshen up on your Java skills.
This is good because the Scanner class provides many useful methods for getting input
from the user, such as the method next Line () which returns a captured line of typed text.
Furthermore, this text can be stored in a String variable called player Move which can be used
later for comparing the user’s move against the computers. next Line () is called directly on us
object scanner and note the lowercase ‘s’ because we are calling it on the object.Now the
program will ask the player to make a move and after typing either “rock”, “paper” or
“scissors” the move will be saved in player Move.
Random class for generating randomness which we will use to get a number between 0 and 2
(0, 1 or 2), each one corresponding to one of the three moves (rock, paper or scissors). To do
this we the computer needs to make a move as well and we want it to be random. Luckily for
us there need two things: an object of type Random and an int variable to store the random
integer. In addition, we can call next Int (3) on the object to get a value from 0 to 2. Do not
forget to import java. util. Random at the top of your program! Now we will declare a String
variable called computer Move and below it we will decide what it should contain. Decisions
are easily done with the help of conditions. So, this is exactly what we will be doing with if-
elseif-else blocks. Now every random integer from 0 to 2 will assign
See how the method takes two arguments: player Move and computer Move
and returns true for all the cases where the player wins. For example, if the player chose “rock”
then if computer Move. Equals("scissors") is true that means the player won, the other two
cases being a loss and a draw (which we will handle soon).
again, using our Scanner object. Unfortunately, there are some issues with Java skipping line
using scanner.
Next Int () to immediately get an integer. We will instead use scanner. next Line () and
convert the received String to an int using Integer. Parse Int (). The final program looks
like this:
Extras
Clean code: The code above is very long and maybe hard to read. In programming it
is often a good practice to divide your code into many smaller methods. Try doing
that with the contents of playRockPaperScissors ()!
Error handling: The way this game is written right now there is much room for
logical errors. For example, the user could enter “Rock” or “rock” and the program
would not understand it, leading to weird outputs. Try writing a loop to keep asking
the user for an input that is correct before proceeding! Alternatively write a method
for converting text like “rock” to “rock”!
Fig no 2.1
3.1 Code
like to play?");
{ playRockPaperScissors(scanner);
String computerMove;
18
CORE JAVA CODE
if (randomNumber == 0) {
computerMove = "rock";
}
else if (randomNumber == 1)
{ computerMove = "paper";
}
else {
computerMove = "scissors";
}
// Print results
if (playerMove.equals(computerMove))
{System.out.println("It's a
draw!");
}
else if (playerWins(playerMove, computerMove))
{System.out.println("Player wins!");
}
else {
System.out.println("Computer wins!");
}
else if (playerMove.equals("paper")) {
return computerMove.equals("rock");
}
else {
return computerMove.equals("paper");
3.2 Result:
paper
rock
rock
scissors
Player wins!
paper
Computer win
paper
rock
rock
scissors
Games like these can be easily coded provided we know the logic and basic syntax of
the language we are to write code in. By using simple if-else statements we can build
The “Rock, Paper, Scissors” commercial equates an Android with unity, diversity, and
togetherness. It uses the friendship of a rock, paper, and scissors metaphor to a associate
an android with a better “mobile ecosystem that promotes a diverse range of options”
for customers. It celebrates diversity and uniqueness that may not be shown with
This project introduced you to Java basics, including variables, loops, conditionals, and
methods. You can now expand on this project, adding features such as a scoring system,
improved user interface, or even multiplayer support. Keep practicing and exploring
FUTURE ENHANCEMENT
Rock paper scissors AI game usually features a simple interface where the user picks
one of the three options, and the AI opponent reveals its choice almost instantaneously,
revealing the result of the round. Rock paper scissors AI game usually features a simple
interface where the user picks one of the three options, and the AI opponent reveals its
choice almost instantaneously, revealing the result of the round.
We can also bring game into visual form with appropriate CGI and other visual effects
We can also include players profile of the player which keep track regarding the
performance of the player over a course of time. Performance may in terms of its
prediction, achievements and accuracy in prediction of future event.
We can also include authentication and encryption to make game more protective and
denying the access to other people other than player.
We can also make game online so that players can participate globally through global
network or server.
Including chat box, emoji and may other conversation medium which enables the
players to share their experience, emotion and feedback while playing the game.
23