0% found this document useful (0 votes)
19 views1 page

Java Programming Notes

Uploaded by

shrutimanval104
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views1 page

Java Programming Notes

Uploaded by

shrutimanval104
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Java Programming Notes

Introduction to Java
Java is a high-level, class-based, object-oriented programming language designed to have as few
implementation dependencies as possible. It is widely used for building cross-platform applications.

Basic Syntax
- Case-sensitive language - Class names should start with uppercase - Source file name must match
the public class name - The main method: public static void main(String[] args)

Data Types in Java


Primitive Data Types: - byte, short, int, long - float, double - char, boolean Non-Primitive Data Types: -
String, Arrays, Classes, Interfaces

Control Statements
- if, if-else, nested if - switch-case - loops: for, while, do-while - break and continue

Object-Oriented Programming Concepts


- Class and Object - Inheritance - Polymorphism - Abstraction - Encapsulation

Exception Handling
Java provides a robust mechanism to handle runtime errors using: - try, catch, finally - throw and
throws - user-defined exceptions

Java Libraries
Commonly used packages: - java.util - java.io - java.net - java.sql - java.time

Conclusion
Java remains one of the most popular programming languages in the world, used in web, mobile,
desktop, and enterprise applications.

You might also like