Ir Bhavesh
Ir Bhavesh
An Internship-(II) Report
Submitted in partial fulfillment of the requirement
for the degree of
Bachelor of Technology In
Computer Science and
Engineering July-December 2024
SUBMITTED BY:
Bhavesh kahar
(0704CS221048)
INTERNSHIP CERTIFICATE
I
RECOMMENDATION
II
DECLARATION
I Bhavesh Kahar hereby declare that I have undertaken 2 weeks internship work at “Infosys
Springboard” during a period from 24/06/2024 to 07/07/2024 in partial fulfillment for the award
of the Bachelor of Technology in Computer Science and Engineering from Mahakal
Institute of Technology, Ujjain by Rajiv Gandhi Prodyogiki Vishwavidyalaya, Bhopal. The
work which is being presented in the internship report submitted to Department of Computer
Science & Engineering from Mahakal Institute of Technology, Ujjain, is an authentic record of
training work.
0704CS221048
III
ACKNOWLEDGEMEN
The successful completion of this internship report would not have been possible without the support
and assistance of many individuals and organizations. I feel immensely blessed to have gotten this
during the course of my internship program. I would like to take this opportunity to offer my earnest
admiration to each and every one of them.
I am in debted and thankful to my learned and revered Prof. Balram Yadav, Head of Department of
Computer science and Engineering, Mahakal Institute of Technology, Ujjain(M.P),for his encouraging
support and providing a meticulous platform to learn.
I own my deepest gratitude to internship coordinator Prof. Sharad Morolia for his upbeat personality,
kindness, encouraging support and willingness to help, have tangibly and greatly improve the quality
of my internship report and brought up to its present status.
I
ABOUT
Infosys is a global leader in next-generation digital services and consulting. Established in 1981
and headquartered in Bengaluru, India, the company provides a wide range of services including
IT consulting, software development, and business process outsourcing. Infosys helps clients
across industries to transform and adapt to the digital age through innovative solutions involving
artificial intelligence, cloud computing, and blockchain. The company is also dedicated to
corporate responsibility and sustainability through initiatives like Infosys Springboard, an
education and learning platform offering free access to skill-building resources.
V
TABLE OF
Declaration III
Acknowledgement IV
About Company/Industry/Institute V
Table of Contents VI
Abstract VII
CHAPTER 1 : INTRODUCTION
(This chapter should include the background of the topic of the training, theoretical
explanation about the same, SW/HW tools learned)
(1-4)
V
CHAPTER 2 TRAINING WORK UNDERTAKEN (5-22)
(This chapter should include the sequential learning
steps, methodology followed and project undertaken, if
any)
2.2 Variables 09
4.2 Loops 15
V
2.5 Module – 5 : Object Oriented Programming (16-22)
5.2 Encapsulation 17
5.3 Inheritance 18
5.4 Polymorphism 20
(This chapter should include any results and the related discussions for
the projects made during training. If no project has been made the results
and snapshots for the tools learnt should be included)
3.4 Project 22
REFERENCES 29
V
APPENDIX A (30-31)
Screenshots
APPENDIX B (32-37)
Daily Diary
V
ABSTRAC
This report documents the experiences and learnings during the internship at Infosys
Springboard, with a focus on mastering Java Programming Fundamentals (Core Java). The
training covered key topics such as object-oriented programming, exception handling,
multithreading, and file input/output operations. A practical project, involving the
development of an ATM system, was undertaken to apply theoretical concepts to a real-world
scenario. The project demonstrated skills in Java programming, enhancing problem-solving
abilities and providing a strong foundation for future software development projects.
V
FIGURE
VI
Java Programming
CHAPTER : 1
INTRODUCTION
1.1OVERVIEW OF JAVA
1991 : Java was initiated as a project called "Green" at Sun Microsystems, led by James
Gosling. The language was originally intended for consumer electronics.
1995 : Java 1.0 was officially released. It introduced the core features of Java,
including its syntax and object-oriented principles.
1996 : The first version of the Java Development Kit (JDK) was released, enabling
developers to create Java applications.
2006 : Java was released as open-source, which significantly increased its adoption and
community contributions.
2010 : Oracle acquired Sun Microsystems and took over the development and
management of Java.
2021 : Java 17 was released as a Long-Term Support (LTS) version, continuing the
language's evolution with new features and improvements.
1.3 Platform
FEATURESIndependence:
OF JAVA Java programs are compiled into bytecode, which can run on
any Java Virtual Machine (JVM), making it platform-independent. This is a key aspect
of Java's philosophy.
Security: Java provides a robust security model that includes features like bytecode
verification, a security manager, and a set of APIs for secure programming, making it
suitable for networked and web-based applications.
Portability: Because of its platform independence and the use of bytecode, Java
applications can be easily transferred and executed on different platforms without
modification.
JDK (Java Development Kit): A software development kit that provides tools and
libraries for developing Java applications. It includes the Java compiler, tools
for debugging, and other utilities.
JVM (Java Virtual Machine): An abstract computing machine that enables a computer
to run Java programs. It interprets the compiled Java bytecode and translates it
into machine code for execution.
JRE (Java Runtime Environment): A part of the JDK that provides the libraries and
components necessary to run Java applications. It includes the JVM, core libraries, and
other resources needed for running Java programs.
Java SE (Standard Edition): The core Java platform that provides the basic
functionalities for developing desktop applications and applets. It includes essential
libraries and APIs for GUI development, networking, I/O, and more.
This overview highlights the fundamentals of Java, its historical context, core features, key
components, and the various editions tailored for different application types.
CHAPTER : 2
MODULE : 1
BASIC JAVA SYNTAX
Basic Java Syntax refers to the set of rules that define the structure of a Java program.
Understanding syntax is crucial for writing valid Java code. Key components include:
Identifiers: Names given to elements such as variables, classes, and methods. Identifiers
must start with a letter, underscore, or dollar sign, followed by letters, digits, underscores,
or dollar signs. They are case-sensitive (e.g., myVariable and myvariable are different).
Data Types: Java is statically typed, meaning variables must be declared with a specific
data type, such as int, double, char, boolean, etc.
Operators: Symbols that perform operations on variables and values. Common operators
include arithmetic (+, -, *, /), relational (==, !=, <, >), and logical (&&, ||, !).
Control Statements: Used to control the flow of execution. This includes conditional
statements (if, switch) and loops (for, while, do-while)
To
1.1start programming
SETTING UP in Java,
JAVAyou DEVELOPMENT
need to set up a Java ENVIRONMENT
Development Environment. This
typically involves:
Installing JDK: Download the Java Development Kit (JDK) from the official Oracle
website or OpenJDK distribution. The JDK includes the Java Runtime Environment
(JRE), the Java compiler, and other tools.
Choosing an IDE: While you can write Java code in any text editor, using an Integrated
Development Environment (IDE) like Eclipse, IntelliJ IDEA, or NetBeans can enhance
productivity with features like code completion, debugging tools, and project
management.
Verify Installation: Open a terminal or command prompt and type java -version to check
your Java installation.
Class Declaration: Every Java program must have at least one class, defined using
the class keyword. The class name should match the filename
(e.g., HelloWorld.java contains public class HelloWorld).
Main Method: The entry point of any Java application is the main method, defined as
public static void main(String[] args). This method is where the program begins
execution.
Statements: Inside the main method, you can write statements that define the program's
behavior, such as variable declarations, method calls, and control flow statements.
Example: java public class HelloWorld { public static void main(String[] args)
{ System.out.println("Hello, World!"); } }
Compilation
1.3 and execution areAND
COMPILATION two critical steps in running
EXECUTION OFa Java
JAVAprogram:
PROGRAMS
Compilation: The Java compiler (javac) translates Java source code (with
a .java extension) into bytecode (with a .class extension) that can be executed by the
JVM. To compile a Java program, use the command:
javac HelloWorld.java
Execution: After successful compilation, the bytecode can be executed on the JVM using
the java command: java HelloWorld This will run the main method of
the HelloWorld class, producing output on the console.
By understanding these fundamental aspects of Java, you can effectively write, compile, and run
Java programs while adhering to best practices in coding.
MODULE : 2
DATA TYPES AND VARIABLES
2.1DATA TYPES
In Java, data types are essential for defining the nature of data that can be stored and
manipulated within a program. They are categorized into two main groups:
Primitive data types are the most basic types of data built into the Java language. They represent
single values and are not objects. Java has eight primitive data types:
Reference data types, on the other hand, are used to refer to objects and are created using
classes. These types do not store the actual data. Common examples of reference data types
include:
Classes: User-defined data types that can contain fields (variables) and methods (functions).
Interfaces: Abstract types that allow for the definition of methods without
implementing them.
Variables
2.2 are named storage locations in memory that hold data. In Java, variables must be
VARIABLES
declared with a specific data type before they can be used. The syntax for declaring a variable is:
In summary, Java's primitive data types and variables provide a robust framework for handling
data. Understanding how to declare variables, use constants, and perform type casting is crucial
for effective programming in Java. With these fundamentals, you can manage data efficiently
and ensure that your code behaves as expected.
MODULE : 3
OPERATORS AND EXPRESSIONS
In Java, operators are special symbols that perform operations on variables and values. They are
fundamental to creating expressions that allow developers to manipulate data and control the
flow of a program. Below is a detailed description of the different types of operators supported
by Java:
Arithmetic
3.1 operators are used OPERATORS
ARITHMETIC to perform basic mathematical operations. The primary arithmetic
operators in Java include:
Division (/): Divides the first operand by the second. If both operands are integers, the
result is also an integer (the fractional part is discarded).
Modulus (%): Returns the remainder of the division of the first operand by the second.
Example:
int a = 10, b = 3;
Greater than (>): Checks if the left operand is greater than the right.
Less than (<): Checks if the left operand is less than the right.
Greater than or equal to (>=): Checks if the left operand is greater than or equal to the right.
Less than or equal to (<=): Checks if the left operand is less than or equal to the right.
Example:
int x = 5, y = 10;
false
Logical
3.3 operators
LOGICALare used to combine multiple boolean expressions. The primary logical
OPERATORS
operators in Java include:
Logical NOT (!): Reverses the logical state of its operand. If the condition is true, it
becomes false, and vice versa.
Example:
Bitwise
3.4 operators
BITWISEperform operations on the individual bits of integer types. They include:
OPERATORS
Bitwise AND (&): Compares each bit of two numbers and returns a new number with
bits set to 1 where both corresponding bits were 1.
Bitwise OR (|): Compares each bit of two numbers and returns a new number with bits
set to 1 where at least one of the corresponding bits was 1.
Bitwise XOR (^): Compares each bit of two numbers and returns a new number with
bits set to 1 where the corresponding bits differ.
Example:
0111)
MODULE : 4
CONTROL STRUCTURES
Control structures are essential components in programming that manage the flow of execution
within a program. They allow developers to dictate how the program behaves under different
conditions and enable repetitive tasks. Here’s a brief overview of the primary types of control
structures in Java:
Conditional
4.1 structures are used STRUCTURES
CONDITIONAL to make decisions in the program based on certain conditions.
The main types include:
else Statement: Provides an alternative block of code that executes if the condition in the
if statement is false.
switch Statement: Allows the execution of one block of code among many based on
the value of a variable or expression.
4.2 LOOPS
Loops are control structures that allow for the repeated execution of a block of code as long as a
specified condition is true. The primary types of loops in Java include:
for Loop: Executes a block of code a specific number of times, based on initialization,
condition, and increment/decrement expressions.
while Loop: Repeatedly executes a block of code as long as a specified condition is true.
do-while Loop: Similar to the while loop, but guarantees that the block of code will
execute at least once, as the condition is checked after the code execution.
Loop control statements manage the behavior of loops and can alter the normal flow of
execution within them:
continue: Skips the current iteration of the loop and proceeds to the next iteration.
MODULE : 5
OBJECT-ORIENTED PROGRAMMING (OOP)
A5.1
class inCLASSES
Java is a template
AND that defines the structure and behavior of objects. It contains
OBJECTS
fields that represent the state of an object and methods that define the actions or behaviors that
the object can perform. When a class is instantiated, it creates an object that embodies the
properties defined by the class.
Example:
class Car {
void drive() { //
Method
myCar.color = "Red";
myCar.year = 2020;
Encapsulation
5.2 is a fundamental principle of OOP that restricts direct access to some of an
ENCAPSULATION
object's components, which is a means of preventing unintended interference and misuse of the
methods and data. By using access modifiers (such as private, protected, and public), developers
can control the visibility of class members. This promotes data hiding and ensures that the
internal representation of an object is shielded from outside interference.
Example:
class BankAccount {
balance += amount;
5.3INHERITENCE
Inheritance is a mechanism in OOP that allows one class (the subclass or child class) to inherit
the fields and methods of another class (the superclass or parent class). This promotes code
reusability and establishes a hierarchical relationship between classes. A subclass can also
override methods of the superclass to provide specific implementations.
Example:
class Vehicle {
// Superclass
void start()
System.out.println("Vehicle is starting.");
}
Department of Computer Science and Engineering, Mahakal Institute of Technology, 1
Java Programming
// Subclass
void start()
System.out.println("Bike is starting.");
Bike(); myBike.start();
5.4 POLYMORPHISM
Polymorphism allows methods to perform different actions based on the object that it is acting
upon. In Java, polymorphism is typically achieved through method overriding and method
overloading. This enables a single interface to represent different underlying forms (data types).
Method Overloading: When multiple methods have the same name but differ in
parameters (type or number).
class Animal {
void sound() {
void sound() {
System.out.println("Dog barks.");
class MathOperations {
return a + b;
{ return a + b;
Abstraction
5.5 is the principle of hiding the complex implementation details of a system and
ABSTRACTION
exposing only the essential features to the user. In Java, abstraction can be achieved through
abstract classes and interfaces. An abstract class can have both abstract methods (without a body)
and concrete methods (with a body), while an interface only contains abstract methods.
Example of Abstraction:
{ void draw() {
System.out.println("Drawing a circle.");
CHAPTER : 3
RESULTS AND DISCUSSION
I3.1
exploredEXCEPTION
how to gracefullyHANDLING
handle errors in Java using try, catch, and finally. By writing code
that intentionally threw exceptions (e.g., dividing by zero or accessing invalid array indices), I
practiced catching exceptions like ArithmeticException and ArrayIndexOutOfBoundsException.
This helped me understand how to maintain program stability, even when unexpected errors
occur.
Code Snapshot:
3.2 I learned
FILE how
I/O toOPERATIONS
perform file operations like reading from and writing to files using
Java’s I/O classes such as FileReader, BufferedReader, FileWriter, and BufferedWriter.
Through
various exercises, I practiced reading data from text files and writing processed output
back to files, understanding how Java handles file streams and exceptions during file
operations (e.g., IOException).
Code Snapshot:
3.4 PROJECT
We implemented an ATM system project using Java, covering key concepts like object-oriented
programming and exception handling. Here's a summary of what your project achieves:
ATMInterface Class: The main class where user interaction takes place, looping through
ATM menu options until the user exits.
This project demonstrates a solid understanding of basic Java concepts! Let me know if you'd
like further details or improvements.
This internship provided me with a strong grasp of Java fundamentals. Each concept, from
exception handling to multithreading, was essential in laying the groundwork for future
development projects.
CHAPTER : 4
CONCLUSION AND LEARNINGS
KEY TAKEAWAYS FROM THE INTERNSHIP
3. Collaboration and Teamwork: I had the opportunity to work closely with experienced
developers and collaborate on team projects. This experience taught me the importance of
effective communication, collaboration, and leveraging each team member's strengths to
achieve common goals.
This internshipGROWTH
PERSONAL has been a AND
transformative experience
TECHNICAL for my
SKILL personal and technical growth:
ENHANCEMENT
Confidence in Coding: Regularly writing code and receiving feedback from mentors
boosted my confidence in my programming abilities. I became more comfortable tackling
complex problems and implementing solutions in Java.
Time Management: Balancing multiple tasks and deadlines helped me develop effective
time management skills. I learned to prioritize tasks and work efficiently under pressure.
Java continues
FINAL to be a cornerstone
THOUGHTS ON JAVA'S of software development
IMPORTANCE for several reasons:
IN SOFTWARE DEVELOPMENT
1. Platform Independence: The "write once, run anywhere" (WORA) capability of Java
allows developers to create cross-platform applications, making it a popular choice for
enterprise-level solutions.
2. Robustness and Security: Java's strong memory management, exception handling, and
security features contribute to building reliable and secure applications, making it suitable
for critical systems.
3. Rich Ecosystem: With a vast array of libraries, frameworks, and tools, Java provides
developers with the resources needed to build scalable and efficient applications.
Frameworks like Spring and Hibernate enhance productivity and simplify development.
4. Community Support: Java boasts a large and active community, which means extensive
documentation, tutorials, and forums are available for learners and professionals alike.
This support fosters continuous learning and knowledge sharing.
REFRENCES
This report is based on the learning experience during the Java Programming Fundamentals
(Core Java) course provided by the Infosys Springboard platform. The course covered essential
topics such as object-oriented programming, exception handling, multithreading, and file
input/output operations. The foundational understanding of these Java concepts was developed
through practical exercises, coding examples, and interactive lessons. The project involved
building an ATM system using Java, incorporating real-world use cases and applications of core
Java principles.
All references and learning materials were accessed through the Infosys Springboard platform,
which offers structured, self-paced learning modules, tutorials, and practice exercises for
programming languages and other skills. This platform played a critical role in enhancing both
theoretical and practical knowledge of Java development.
APPENDIX A
SCREENSHOT
APPENDIX B
DAILY DIARY
DAILY DIARY
Explored the history and evolution of Java, focusing on its key features like platform
independence and security.
DAILY DIARY
Familiarized myself with the structure of a Java program, including the main method.
DAILY DIARY
DAY
Studied3: BASIC
Java syntax, JAVA
focusingSYNTAX
on comments, data types, and variables.
DAILY DIARY
Explored primitive (int, float, char, boolean) and non-primitive data types (arrays, strings).
DAILY DIARY
.
DAY 5: OPERATORS AND EXPRESSIONS
Learned about different types of operators: arithmetic, relational, logical, and bitwise.
DAILY DIARY
DAILY DIARY
DAILY DIARY
DAY 2: ARRAYS
Studied AND and
one-dimensional STRINGS
multi-dimensional arrays.
Explored the String class and practiced various string methods (substring, indexOf, etc.).
DAILY DIARY
Explored the throw and throws keywords and learned about checked and unchecked
exceptions.
DAILY DIARY
Wrote programs to read from and write to text files using BufferedReader and
Buffered Writer.
DAILY DIARY
Introduced to Java Collections Framework, including List, Set, and Map interfaces.
Practiced using Array, List, HashSet, and HashMap in various coding exercises.
Explored iterators and the enhanced for loop for traversing collections.