Nisha Sharma 22EGJIT012

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 10

GLOBAL INSTITUTE OF TECHNOLOGY

Department of Information Technology


An
INDUSTRIAL TRAINING
on
Core JAVA

Submitted to :- Presented By :-
Mr. Pradeep Jha Session: 2023-24 Nisha Sharma
Head of Dept. 22EGJIT012
CS/IT//AI/DS 3rdsem., 2nd year
CONTENT

• What is Java???
• History of Java
• Basic Java syntax
• Control Structures
• Functions or Methods
• OOPs
• Conclusion
What is JAVA???

Java - A Versatile Programming Language

Definition:- Java is a platform-independent, high-level, object-oriented


programming language.

Importance:- Widely used in web development, mobile apps, and enterprise


solutions.

Platform Independence:- "Write Once, Run Anywhere" with Java bytecode.


History of Java
Java's Origins and Key Milestones:-
• Overview: Java was developed by James Gosling and his team at Sun
Microsystems.
• Key Milestones: Notable releases in 1995, 2004, 2011, and more.

James Gosling and Sun Microsystems:-


• Importance: James Gosling played a pivotal role in Java's creation.
• Sun Microsystems: The company behind Java's initial development and
promotion.
Basic Java Syntax
Variables and Data Types :-
• Variables: Used to store data, including numbers, text, and more.
• Data Types: Specify the kind of data a variable can hold, such as int, double, or String.

Declaring and Initializing Variables :-


• Declaration: Defining a variable's name and data type.
• Initialization: Assigning an initial value to a variable using the "=" operator.

Comments and Semicolons :-


• Comments: Notes for developers; ignored by the compiler (e.g., // for single-line
comments or /* */ for multi-line comments).
• Semicolons: Used to end statements in Java to indicate the completion of a command.
Control Structures
If-Else Statements :-
• Used for decision-making in Java.
• Executes different code blocks based on a specified condition.
Switch Statements :-
• Provides a way to evaluate multiple conditions.
• An alternative to long chains of if-else statements.
Loops (for, while, do-while) :-
• For Loop: Repeats a block of code a specific number of times.
• While Loop: Repeats a block of code while a specified condition is true.
• Do-While Loop: Similar to a while loop but guaranteed to run at least once.
Functions (Methods)
Defining Methods :-
• Methods are reusable blocks of code.
• Defined using a return type, name, and optional parameters.
• They encapsulate specific functionality within your program.

Method Parameters and Return Types :-


• Parameters: Inputs that a method receives and uses within its code.
• Return Types: Specify the type of data a method will return after execution.

Calling Methods :-
• Invoking a method to execute its code.
• Methods can be called from within the same class or from other classes.
Object-Oriented Programming (OOP)
Introduction to OOP :-
• OOP is a programming paradigm based on the concept of objects.
• It focuses on organizing code around objects, their properties, and behaviors.

Classes and Objects :-


• Classes: Blueprint or template for creating objects.
• Objects: Instances of classes, representing real-world entities.

Encapsulation, Inheritance, and Polymorphism :-


• Encapsulation: Bundling data (attributes) and methods (behaviors) within a class.
• Inheritance: Mechanism to create a new class from an existing one, inheriting its attributes and
behaviors.
• Polymorphism: Ability of objects to take on multiple forms and respond differently to the same
method call.
Conclusion

In summary, we've covered Java's history, core


concepts, and its power in building versatile
applications through control structures, methods,
and object-oriented programming. We highlighted
Java's platform independence for web development,
mobile apps, and enterprise solutions.
FOR YOUR ATTENTION

Any Queries
???

You might also like