• Have Any Queries +919677781155
  • Call : 1800 889 0145
  • info@elysiumacademy.org
  • Have Any Queries +919677781155
  • Call : 1800 889 0145
  • info@elysiumacademy.org
Logo (2)
  • About Us
    • Academy Overview
    • Mission & Vision
    • Foot Steps
    • Our Pillars
    • Gallery
    • Testimonials
      • Video Testimonials
      • Reviews
    • Our Awards
  • Tesbo Courses
      Tesbo Courses PREMIUM
      • Full Stack JS Programmer Course
      • Full Stack Core Programmer
      • Full Stack Native Programmer
      • Data Analyst CourseOFFER
      • Testing Expert CourseOFFER
      • Mobile App Developer Course
      • IT Infra Manager
      • Cloud Architect Course
      • DevOps Engineer Course
      • Digital Marketing CourseOFFER
      Slash CoursesBUDGET
      • Core C & C++ Coures
      • Core Java & Concepts Course
      • Core Python & Concepts Course OFFER
      • Core UI Development Course
      • Microsoft Office Course
      • CompTIA – Hardware A+ Course
      Classic Courses BUDGET
      • Core C & C++ Coures
      • Core Java & Concepts Course
      • Core Python & Concepts Course OFFER
      • Core MSSQL Course
      • Digital Marketing Courses
      mega-menu
  • Professional Course
      Professional Courses
      Programming Training
      • Programming Course TOP
      • Advanced Java Course
      • Advanced Python Course
      Full Stack Training
      • MERN Stack Course
      • MEAN Stack Course
      Mobile App Training
      • Android Course
      • IOS CourseOFFER
      • Flutter & Dart Course
      • React Native CourseOFFER
      Cyber Security Training
      • Hacking Defender Course
      • Security+ Course
      • Security Analyst+ Course
      • Elynux Essentials Course
      Networking Tranining
      • CCNA - Cisco Solutions
      • CCNP - Switching , Routing
      • Hardware A+ & Network N+
      DB Management Training
      • MySQL & MSSQL Course
      • Oracle DB Management
      Software Testing
      • ISTQB Course TOP
      • Automation Testing TOP
      Data Science & Analyst
      • Python for Data Science-ML
      • DA- (R,Tableau & Power BI)
      Cloud Computing Training
      • Cloud Practioner Course
      • Cloud Solution Architect Course
      • DevOps Professional Course
      • Cloud DevOps Engineer Course
      Crash Courses
      Programming Training
      • C++ Programming Course
      • Java Course OFFER
      • Python Course
      • UI Development Course
      • AngularJs Course
      • NodeJs Course
      • ReactJs Course
      • Wordpress Course
      • .Net Course TOP
      • Go Programming Course
      • Perl Programming Course
      • C# Programming CourseOFFER
      Business Management Course
      • Microsoft Office Course
      • Excel for Enterprises Course
      Testing Training
      • Selenium Java Course
      • Selenium Python Course
      Security Training
      • Hardware A+ Course
      • Cloud Associate Course
      • Azure Fundamental Course
      • Azure Administrator Course
      Digital Marketing Training
      • Digital Marketing Course
      • SMM Course TOP
      • PPC Expert Course
      • Advanced SEO Course
      • SMO Course OFFER
      DB Management Training
      • MSSQL Course
      • Core MYSQL OFFER
      • Oracle Fundamentals Course
      • Oracle DBA Course
      • Oracle PL SQL Course
      Professional Courses
      Programming Training
      • Programming Course TOP
      • Advanced Java Course
      • Advanced Python Course
      Full Stack Training
      • MERN Stack Course
      • MEAN Stack Course
      • Python Full Stack Course
      • Java Full Stack Course
      • PHP Full Stack Course
      • .Net Full Stack Course
      • JS Family Full Stack Course
      Mobile App Training
      • Android Course
      • IOS CourseOFFER
      • Flutter & Dart Course
      • React Native CourseOFFER
      Cyber Security Training
      • Hacking Defender Course
      • Security+ Course
      • Security Analyst+ Course
      • Elynux Essentials Course
      Networking Training
      • CCNA - Cisco Solutions
      • CCNP - Switching , Routing
      • Hardware A+ & Network N+
      DB Management Training
      • MySQL & MSSQL Course
      • Oracle DB Management
      Software Test Training
      • Software Test Expert Course TOP
      • Automation Testing TOP
      Data Science & Analyst
      • Python for Data Science-ML
      • DA- (R,Tableau & Power BI)
      Cloud Computing Training
      • Cloud Solution Architect Course
      • DevOps Professional Course
      • Cloud DevOps Engineer Course
      SAP Training
      • Finance & Controlling
      • Materials Management
      • Human Capital Management
      • Advanced Business App Programming
      • High-Performance Analytic Appliance
      Crash Courses
      Programming Training
      • C & C++ Programming Course
      • Java Course OFFER
      • Python Course
      • Core PHP Course
      • UI Development Course
      • AngularJs Course
      • NodeJs Course
      • ReactJs Course
      • Wordpress Course
      • .Net Course TOP
      • Go Programming Course
      • Perl Programming Course
      • C# Programming CourseOFFER
      Business Management Course
      • Microsoft Office Course
      • Excel for Enterprises Course
      Testing Training
      • Selenium Java Course
      • Selenium Python Course
      • Manual Tester - ISTQB Course
      Security Training
      • Hardware A+ Course
      • Cloud Associate Course
      • Azure Fundamental Course
      • Azure Administrator Course
      Digital Marketing Training
      • Digital Marketing Course
      • SMM Course TOP
      • PPC Expert Course
      • Advanced SEO Course
      • SMO Course OFFER
      DB Management Training
      • MSSQL Course
      • Core MYSQL OFFER
      • Oracle Fundamentals Course
      • Oracle DBA Course
      • Oracle PL SQL Course
      AI Mastery Program
      • AI Engineering For Developers
      • AI Power Digital Marketing
      • AI Mastery For Entrepreneurs Programme
  • Support
    • Placement Training
    • Career Guidance
    • Appointment Booking
    • Help Center
    • Tech Blog
    • Elysium Spark Notes
    • MicroBookShelf
    • Elysium CodeSheet
    • Interview Question
    • Download
    • Ask Elsa
    • Franchise Oppurtunity 
    • Classmate App
  • Contact Us
      • Madurai
      • Tirunelveli
      • Perambalur
      • Trichy
      • Theni
      • Coimbatore - Hopes
      • Hosur
      • Tiruppur
      • Thoothukudi

      Contact Us

      • 227, IInd Floor, B Block, Elysium Campus, Church Rd, Anna Nagar, Madurai, Tamil Nadu 625020
      • 096777 81155, 096777 24437
      • +91 (0452) 4353702
      • info@elysiumacademy.org
      Madurai
      View More

      Contact Us

      • Castro Palace, 48/5, S Bypass Rd, Xavier Colony, Vasanth Nagar, Tirunelveli, Tamil Nadu 627005
      • 09488126688
      • tnv@elysiumacademy.org
      Tirunelveli
      View More

      Contact Us

      • 2nd Floor, Ponmanam Plaza, above Reliance Trends, near New Bus Stand, Thuraimangalam, Perambalur, Tamil Nadu 621212
      • +91 94422 20202
      • pbr@elysiumacademy.org
      Perambalur
      View More

      Contact Us

      • 2nd Floor, Jaishree Towers, C-142, 9A Cross Rd, above SBI Bank6th Cross East, Thillai Nagar East, West Thillai Nagar, Tennur, Tiruchirappalli, Tamil Nadu 620018
      • +91 9952887895
      • try@elysiumacademy.org
      tiruchy
      View More

      Contact Us

      • D. No.635/A, 3rd Floor, Near State Bank of India, Periyakulam Road, Theni
      • 78978 94002
      • 78978 95002
      • teni@elysiumacademy.org
      contact theni img
      View More

      Contact Us

      • 62, Suriya Complex, Gandhi Street, Thaneerpanthal Road, BR Puram, Hope College,
        Coimbatore -641 004. Landmark – Opp GRG School Ground
      • +91 96777 04758
      • +91 96777 04785
      • cbe.hopes@elysiumacademy.org
      contact cbe hopes img
      View More

      Contact Us

      • First Floor, No. 16, F/8, Hosur - Krishnagiri Rd, adjacent to Ameeria petrol bunk, Hosur, Tamil Nadu 635109
      • +91 993637 73741
      • hsr@elysiumacademy.org
      contact hosur img
      View More

      Contact Us

      • No.9/3C, Mariamman koil street, Padmavathipuram, SAP Theatre opposite, Tiruppur - 641603.
      • +91 7397391713
      • +91 7397391318
      • tup@elysiumacademy.org
      software training institutes
      View More

      Contact Us

      • 127, Ettayapuram Road, Melur Tuticorin, Tuticorin Central Police Station, Thoothukudi - 628002
      • +9193841 34008
      • +9193841 64008
      • ttk@elysiumacademy.org
      Contact -Tuticorin
      View More
  • About Us
    • Academy Overview
    • Mission & Vision
    • Foot Steps
    • Our Pillars
    • Gallery
    • Testimonials
      • Video Testimonials
      • Reviews
    • Our Awards
  • Tesbo Courses
      Tesbo Courses PREMIUM
      • Full Stack JS Programmer Course
      • Full Stack Core Programmer
      • Full Stack Native Programmer
      • Data Analyst CourseOFFER
      • Testing Expert CourseOFFER
      • Mobile App Developer Course
      • IT Infra Manager
      • Cloud Architect Course
      • DevOps Engineer Course
      • Digital Marketing CourseOFFER
      Slash CoursesBUDGET
      • Core C & C++ Coures
      • Core Java & Concepts Course
      • Core Python & Concepts Course OFFER
      • Core UI Development Course
      • Microsoft Office Course
      • CompTIA – Hardware A+ Course
      Classic Courses BUDGET
      • Core C & C++ Coures
      • Core Java & Concepts Course
      • Core Python & Concepts Course OFFER
      • Core MSSQL Course
      • Digital Marketing Courses
      mega-menu
  • Professional Course
      Professional Courses
      Programming Training
      • Programming Course TOP
      • Advanced Java Course
      • Advanced Python Course
      Full Stack Training
      • MERN Stack Course
      • MEAN Stack Course
      Mobile App Training
      • Android Course
      • IOS CourseOFFER
      • Flutter & Dart Course
      • React Native CourseOFFER
      Cyber Security Training
      • Hacking Defender Course
      • Security+ Course
      • Security Analyst+ Course
      • Elynux Essentials Course
      Networking Tranining
      • CCNA - Cisco Solutions
      • CCNP - Switching , Routing
      • Hardware A+ & Network N+
      DB Management Training
      • MySQL & MSSQL Course
      • Oracle DB Management
      Software Testing
      • ISTQB Course TOP
      • Automation Testing TOP
      Data Science & Analyst
      • Python for Data Science-ML
      • DA- (R,Tableau & Power BI)
      Cloud Computing Training
      • Cloud Practioner Course
      • Cloud Solution Architect Course
      • DevOps Professional Course
      • Cloud DevOps Engineer Course
      Crash Courses
      Programming Training
      • C++ Programming Course
      • Java Course OFFER
      • Python Course
      • UI Development Course
      • AngularJs Course
      • NodeJs Course
      • ReactJs Course
      • Wordpress Course
      • .Net Course TOP
      • Go Programming Course
      • Perl Programming Course
      • C# Programming CourseOFFER
      Business Management Course
      • Microsoft Office Course
      • Excel for Enterprises Course
      Testing Training
      • Selenium Java Course
      • Selenium Python Course
      Security Training
      • Hardware A+ Course
      • Cloud Associate Course
      • Azure Fundamental Course
      • Azure Administrator Course
      Digital Marketing Training
      • Digital Marketing Course
      • SMM Course TOP
      • PPC Expert Course
      • Advanced SEO Course
      • SMO Course OFFER
      DB Management Training
      • MSSQL Course
      • Core MYSQL OFFER
      • Oracle Fundamentals Course
      • Oracle DBA Course
      • Oracle PL SQL Course
      Professional Courses
      Programming Training
      • Programming Course TOP
      • Advanced Java Course
      • Advanced Python Course
      Full Stack Training
      • MERN Stack Course
      • MEAN Stack Course
      • Python Full Stack Course
      • Java Full Stack Course
      • PHP Full Stack Course
      • .Net Full Stack Course
      • JS Family Full Stack Course
      Mobile App Training
      • Android Course
      • IOS CourseOFFER
      • Flutter & Dart Course
      • React Native CourseOFFER
      Cyber Security Training
      • Hacking Defender Course
      • Security+ Course
      • Security Analyst+ Course
      • Elynux Essentials Course
      Networking Training
      • CCNA - Cisco Solutions
      • CCNP - Switching , Routing
      • Hardware A+ & Network N+
      DB Management Training
      • MySQL & MSSQL Course
      • Oracle DB Management
      Software Test Training
      • Software Test Expert Course TOP
      • Automation Testing TOP
      Data Science & Analyst
      • Python for Data Science-ML
      • DA- (R,Tableau & Power BI)
      Cloud Computing Training
      • Cloud Solution Architect Course
      • DevOps Professional Course
      • Cloud DevOps Engineer Course
      SAP Training
      • Finance & Controlling
      • Materials Management
      • Human Capital Management
      • Advanced Business App Programming
      • High-Performance Analytic Appliance
      Crash Courses
      Programming Training
      • C & C++ Programming Course
      • Java Course OFFER
      • Python Course
      • Core PHP Course
      • UI Development Course
      • AngularJs Course
      • NodeJs Course
      • ReactJs Course
      • Wordpress Course
      • .Net Course TOP
      • Go Programming Course
      • Perl Programming Course
      • C# Programming CourseOFFER
      Business Management Course
      • Microsoft Office Course
      • Excel for Enterprises Course
      Testing Training
      • Selenium Java Course
      • Selenium Python Course
      • Manual Tester - ISTQB Course
      Security Training
      • Hardware A+ Course
      • Cloud Associate Course
      • Azure Fundamental Course
      • Azure Administrator Course
      Digital Marketing Training
      • Digital Marketing Course
      • SMM Course TOP
      • PPC Expert Course
      • Advanced SEO Course
      • SMO Course OFFER
      DB Management Training
      • MSSQL Course
      • Core MYSQL OFFER
      • Oracle Fundamentals Course
      • Oracle DBA Course
      • Oracle PL SQL Course
      AI Mastery Program
      • AI Engineering For Developers
      • AI Power Digital Marketing
      • AI Mastery For Entrepreneurs Programme
  • Support
    • Placement Training
    • Career Guidance
    • Appointment Booking
    • Help Center
    • Tech Blog
    • Elysium Spark Notes
    • MicroBookShelf
    • Elysium CodeSheet
    • Interview Question
    • Download
    • Ask Elsa
    • Franchise Oppurtunity 
    • Classmate App
  • Contact Us
      • Madurai
      • Tirunelveli
      • Perambalur
      • Trichy
      • Theni
      • Coimbatore - Hopes
      • Hosur
      • Tiruppur
      • Thoothukudi

      Contact Us

      • 227, IInd Floor, B Block, Elysium Campus, Church Rd, Anna Nagar, Madurai, Tamil Nadu 625020
      • 096777 81155, 096777 24437
      • +91 (0452) 4353702
      • info@elysiumacademy.org
      Madurai
      View More

      Contact Us

      • Castro Palace, 48/5, S Bypass Rd, Xavier Colony, Vasanth Nagar, Tirunelveli, Tamil Nadu 627005
      • 09488126688
      • tnv@elysiumacademy.org
      Tirunelveli
      View More

      Contact Us

      • 2nd Floor, Ponmanam Plaza, above Reliance Trends, near New Bus Stand, Thuraimangalam, Perambalur, Tamil Nadu 621212
      • +91 94422 20202
      • pbr@elysiumacademy.org
      Perambalur
      View More

      Contact Us

      • 2nd Floor, Jaishree Towers, C-142, 9A Cross Rd, above SBI Bank6th Cross East, Thillai Nagar East, West Thillai Nagar, Tennur, Tiruchirappalli, Tamil Nadu 620018
      • +91 9952887895
      • try@elysiumacademy.org
      tiruchy
      View More

      Contact Us

      • D. No.635/A, 3rd Floor, Near State Bank of India, Periyakulam Road, Theni
      • 78978 94002
      • 78978 95002
      • teni@elysiumacademy.org
      contact theni img
      View More

      Contact Us

      • 62, Suriya Complex, Gandhi Street, Thaneerpanthal Road, BR Puram, Hope College,
        Coimbatore -641 004. Landmark – Opp GRG School Ground
      • +91 96777 04758
      • +91 96777 04785
      • cbe.hopes@elysiumacademy.org
      contact cbe hopes img
      View More

      Contact Us

      • First Floor, No. 16, F/8, Hosur - Krishnagiri Rd, adjacent to Ameeria petrol bunk, Hosur, Tamil Nadu 635109
      • +91 993637 73741
      • hsr@elysiumacademy.org
      contact hosur img
      View More

      Contact Us

      • No.9/3C, Mariamman koil street, Padmavathipuram, SAP Theatre opposite, Tiruppur - 641603.
      • +91 7397391713
      • +91 7397391318
      • tup@elysiumacademy.org
      software training institutes
      View More

      Contact Us

      • 127, Ettayapuram Road, Melur Tuticorin, Tuticorin Central Police Station, Thoothukudi - 628002
      • +9193841 34008
      • +9193841 64008
      • ttk@elysiumacademy.org
      Contact -Tuticorin
      View More
Elysium Spark Note

Master In Programming Language(Core Java, Core )

  • October 8, 2024
  • Com 0
Master-In-Programming

1.Python Programming

1.Basics
Print to Console

Copy Code Copied Use a different Browser

print("Hello, World!")
Comments
Copy Code Copied Use a different Browser

# This is a comment
Variables
Copy Code Copied Use a different Browser

x = 5
name = "Alice"
2.Data Types
Numbers
Copy Code Copied Use a different Browser

int_num = 10 Integer
float_num = 10.5 Float
Strings
Copy Code Copied Use a different Browser

str_var = "Hello"
Booleans
Copy Code Copied Use a different Browser

is_active = True
 Lists
Copy Code Copied Use a different Browser

my_list = [1, 2, 3, "four"]
Tuples
Copy Code Copied Use a different Browser

my_tuple = (1, 2, 3)
Dictionaries
Copy Code Copied Use a different Browser

my_dict = {"name": "Alice", "age": 25}
3.Control Structures
 If Statements
Copy Code Copied Use a different Browser

if x > 10:
print("Greater than 10")
elif x == 10:
print("Equal to 10")
else:
print("Less than 10")
For Loops
Copy Code Copied Use a different Browser

for i in range(5):
print(i)
While Loops
Copy Code Copied Use a different Browser

while x < 10:
x += 1
4.Functions
Defining Functions
Copy Code Copied Use a different Browser

def my_function(param1, param2):
return param1 + param2
Lambda Functions
Copy Code Copied Use a different Browser

add = lambda a, b: a + b
Modules and Libraries
Importing Modules
Copy Code Copied Use a different Browser

import math
from datetime import datetime
Using Libraries
Copy Code Copied Use a different Browser

result = math.sqrt(16)
Exception Handling
 Try/Except Blocks
Copy Code Copied Use a different Browser

try:
x = 1 / 0
except ZeroDivisionError:
print("Cannot divide by zero!")
5.File Handling
Reading a File
Copy Code Copied Use a different Browser

with open('file.txt', 'r') as file:
content = file.read()
Writing to a File
Copy Code Copied Use a different Browser

with open('file.txt', 'w') as file:
file.write("Hello, World!")
6.List Comprehensions
Creating Lists
Copy Code Copied Use a different Browser

squares = [x**2 for x in range(10)]
Common Built-in Functions
Length of a List/String
Copy Code Copied Use a different Browser

len(my_list)
Sorting a List
Copy Code Copied Use a different Browser

sorted_list = sorted(my_list)
 Checking Membership
Copy Code Copied Use a different Browser

if 'four' in my_list:
print("Found!")
7.Object-Oriented Programming
Class Definition
Copy Code Copied Use a different Browser

class Dog:
def __init__(self, name):
self.name = name
def bark(self):
return "Woof!"
8.Quick Reference
String Methods
Copy Code Copied Use a different Browser

str_var.lower()
str_var.upper()
str_var.split()
List Methods
Copy Code Copied Use a different Browser

my_list.append(4)
my_list.remove(2)
This should serve as a quick reference for Python programming concepts! Let me know if you need anything else.

2.Java Programming

1.Basic Structure of a Java Program

Copy Code Copied Use a different Browser

public class Main {
public static void main(String[] args) {
// Your code goes here
System.out.println("Hello, World!");
}
}
2.Data Types

  • Primitive Types:
    • int: Integer (4 bytes)
    • float: Floating-point number (4 bytes)
    • double: Double precision floating-point number (8 bytes)
    • char: Character (2 bytes)
    • boolean: True/false (1 bit)
    • byte: Small integer (1 byte)
    • short: Short integer (2 bytes)
    • long: Long integer (8 bytes)

3.Variables and Constants

Copy Code Copied Use a different Browser

int age = 25; // Variable declaration
final double PI = 3.14; // Constant declaration (final keyword)
4.Operators

  • Arithmetic: +, -, *, /, %
  • Comparison: ==, !=, >, <, >=, <=
  • Logical: && (AND), || (OR), ! (NOT)
  • Assignment: =, +=, -=, *=, /=, %=
  • Increment/Decrement: ++, —

5.Control Flow
If-Else Statement:

Copy Code Copied Use a different Browser

if (condition) {
// Code if true
} else {
// Code if false
}

Switch-Case Statement:

Copy Code Copied Use a different Browser

switch (variable) {
case 1:
// Code for case 1
break;
case 2:
// Code for case 2
break;
default:
// Default case
}
For Loop:
Copy Code Copied Use a different Browser

for (int i = 0; i < 5; i++) {
System.out.println(i);
}
While Loop:
Copy Code Copied Use a different Browser

int i = 0;
while (i < 5) {
System.out.println(i);
i++;
}
Do-While Loop:
Copy Code Copied Use a different Browser

int i = 0;
do {
System.out.println(i);
i++;
} while (i < 5);
6.Arrays
Copy Code Copied Use a different Browser

int[] numbers = {1, 2, 3, 4, 5}; // Array declaration
System.out.println(numbers[0]); // Accessing array element
7.Methods
Method Declaration:
Copy Code Copied Use a different Browser

public static returnType methodName(parameter1, parameter2) {
// Method body
return value;
}
Example:
Copy Code Copied Use a different Browser

public static int add(int a, int b) {
return a + b;
}
public static void main(String[] args) {
int result = add(5, 3);
System.out.println(result);
}
8.Classes and Objects
Class Declaration:
Copy Code Copied Use a different Browser

class Person {
String name;
int age;
void display() {
System.out.println("Name: " + name);
}
}
Creating Objects:
Copy Code Copied Use a different Browser

Person p1 = new Person();
p1.name = "John";
p1.age = 30;
p1.display();
9.Constructors
Constructor Example:
Copy Code Copied Use a different Browser

class Person {
String name;
int age;
// Constructor
Person(String name, int age) {
this.name = name;
this.age = age;
}
void display() {
System.out.println("Name: " + name);
}
}
public class Main {
public static void main(String[] args) {
Person p1 = new Person("John", 30);
p1.display();
}
}
10.Inheritance
Extending a Class:
Copy Code Copied Use a different Browser

class Animal {
void eat() {
System.out.println("Eating...");
}
}
class Dog extends Animal {
void bark() {
System.out.println("Barking...");
}
}
Using Derived Class:
Copy Code Copied Use a different Browser

public class Main {
public static void main(String[] args) {
Dog d = new Dog();
d.eat(); // Inherited method
d.bark(); // Dog method
}
}
11.Polymorphism
Method Overriding:
Copy Code Copied Use a different Browser

class Animal {
void sound() {
System.out.println("Animal makes a sound");
}
}
class Dog extends Animal {
@Override
void sound() {
System.out.println("Dog barks");
}
}
Dynamic Polymorphism (Upcasting):
Copy Code Copied Use a different Browser

Animal a = new Dog(); // Parent class reference, child class object
a.sound(); // Calls Dog's overridden method
12.Interfaces
Declaring an Interface:
Copy Code Copied Use a different Browser

interface Animal {
void eat();
}
class Dog implements Animal {
public void eat() {
System.out.println("Dog is eating");
}
}
Using an Interface:
Copy Code Copied Use a different Browser

public class Main {
public static void main(String[] args) {
Animal d = new Dog();
d.eat();
}
}
13.Exception Handling
Try-Catch Block:
Copy Code Copied Use a different Browser

try {
// Code that may throw an exception
int result = 10 / 0;
} catch (ArithmeticException e) {
System.out.println("Error: " + e.getMessage());
} finally {
System.out.println("This block is always executed");
}
Throwing an Exception:
Copy Code Copied Use a different Browser

public static void checkAge(int age) throws Exception {
if (age < 18) {
throw new Exception("Age must be 18 or older");
}
}
14.Collections
 ArrayList:
Copy Code Copied Use a different Browser

import java.util.ArrayList;
ArrayList<String> list = new ArrayList<>();
list.add("Apple");
list.add("Banana");
System.out.println(list.get(0)); // Accessing element
HashMap:
Copy Code Copied Use a different Browser

import java.util.HashMap;
HashMap<String, Integer> map = new HashMap<>();
map.put("Apple", 1);
map.put("Banana", 2);
System.out.println(map.get("Apple")); // Accessing value
File Handling
Reading from a File:
Copy Code Copied Use a different Browser

import java.io.File;
import java.io.FileNotFoundException;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
try {
File file = new File("filename.txt");
Scanner reader = new Scanner(file);
while (reader.hasNextLine()) {
String data = reader.nextLine();
System.out.println(data);
}
reader.close();
} catch (FileNotFoundException e) {
System.out.println("An error occurred.");
e.printStackTrace();
}
}
}
Writing to a File:
Copy Code Copied Use a different Browser

import java.io.FileWriter;
import java.io.IOException;
public class Main {
public static void main(String[] args) {
try {
FileWriter writer = new FileWriter("filename.txt");
writer.write("Hello, World!");
writer.close();
System.out.println("Successfully wrote to the file.");
} catch (IOException e) {
System.out.println("An error occurred.");
e.printStackTrace();
}
}
}
15.Multithreading
Creating a Thread by Extending Thread Class:
Copy Code Copied Use a different Browser

class MyThread extends Thread {
public void run() {
System.out.println("Thread is running");
}
}
public class Main {
public static void main(String[] args) {
MyThread t1 = new MyThread();
t1.start();
}
}
Implementing Runnable Interface:
Copy Code Copied Use a different Browser

class MyRunnable implements Runnable {
public void run() {
System.out.println("Runnable is running");
}
}
public class Main {
public static void main(String[] args) {
Thread t1 = new Thread(new MyRunnable());
t1.start();
}
}

16.Generics
  Generic Method:

Copy Code Copied Use a different Browser

public class Main {
public static <T> void printArray(T[] array) {
for (T element : array) {
System.out.println(element);
}
}
public static void main(String[] args) {
Integer[] intArray = {1, 2, 3};
printArray(intArray);
}
}
This Java provides a concise overview of essential concepts, syntax, and examples to help you quickly reference key Java programming topics.

Download Elysium Spark Note

Search

Latest Post

Thumb
St. Mother Theresa Engineering College MoU with
03 Nov, 2026
Thumb
Mannar Thirumalai Naicker College MoU with CampusBridge
03 Nov, 2026
Thumb
Sri Adi Chunchanagiri Women’s College MoU with
03 Nov, 2026

Categories

  • Data Analytics Courses
  • Data Science & Analytics
  • Data science course
  • Database
  • Database Management
  • DevOps & Automation
  • Devops Course
  • Digital Advertising
  • Digital marketing academy
  • Digital Marketing Course
  • Digital marketing course online
  • Digital Marketing Strategies
  • Education & Learning
  • Education Training
  • Elysium CampusBridge MoU
  • Elysium Spark Note
  • Full Stack Developer Course
  • Go programming certification
  • Hacking Course
  • Hacking Defender Training Course
  • Hardware & Infrastructure
  • IT Certifications
  • IT Networking Education
  • IT Training
  • IT Training Institute
  • Java Course
  • Java Full Stack
  • JavaScript Frameworks
  • Job Oriented Online Courses
  • Machine Learning
  • Master of Business Administration
  • Master of Commerce
  • Master Of Computer Application
  • MEAN Stack Expert Training Course
  • Mern Stack Course Guides
  • MERN Stack Expert Training Course
  • Microsoft Access Training
  • Mobile App Development Courses
  • Msc Computer Science
  • Networking & IT
  • Networking and Security
  • New Courses
  • Online Courses
  • Online Marketing Courses
  • Oracle Certification
  • Others
  • Professional Certification Courses
  • Programming & Development
  • Programming Courses
  • Programming Courses
  • Programming Languages
  • Python Full Stack Developer
  • Python Programming
  • Python Programming Course
  • React Programming
  • ReactJs Training Course
  • SAP Training
  • Selenium
  • Selenium computer training
  • Selenium Training
  • SEO Strategies
  • SEO Tools and Software
  • Social Media Marketing
  • Social media marketing course
  • Software Development
  • Software Testing
  • Software testing Course Online
  • Software Training
  • Software Training Institute
  • SQL Training
  • Technology
  • Technology & IT Solutions
  • UI/UX Design
  • Uncategorized
  • User Experience (UX)
  • Web Automation
  • Web Designing Course
  • Web Development
  • Website Development
blog_card

Tags

100% job assurance courses Android App Developer aws certification Best digital marketing course online Best digital marketing courses with certificates best full stack developer training in Madurai Best Java Course and Certification best Java courses Best Python Training and Certification Course best selenium training center in Madurai Best Software Training Institutes best web design course in Madurai Big Data Analytics training center Big Data Training CampusBridge career guidance career in Data Science career in digital marketing cloud computing certification computer courses course in Madurai cyber security ethical hacking course Data Science Best Institute Data Science Course Data science courses Digital Marketing Certification Course Digital Marketing Classes Digital Marketing Course digital marketing institute digital marketing training elysium academy Ethical Hacking Course Full-Stack Development Full Stack Career Path full stack course full stack developer course full stack developer course fees full stack developer courses full stack python developer full stack web development courses IT Training mobile app developer training MoU SAP Course social media marketing
shape
shape-10
shape
EAPL

Unlock New Career Opportunities with an Accredited Certification from Elysium Academy

Get started now
Logo (2)

At Elysium Academy, we deliver high-impact coaching through immersive classroom experiences and advanced teaching methodologies tailored for measurable success. We take immense pride in our unique identity and are privileged to partner with you on your path to professional excellence.

Icon-facebook Icon-linkedin2 Icon-instagram Pinterest X-twitter Icon-youtube

Company

  • About Us
  • Mission & Vission
  • Blog
  • Reviews
  • Environment Policy
  • Payment Method
  • Our Awards
  • Franchise Oppurtunity
  • Ask Elsa

Student Zone

  • Become an instructor
  • Video Reviews
  • Placed Students
  • Interview Questions
  • Appointment Booking
  • Career Guidance
  • Placement Training
  • Download
  • Help Center

Our Branch Locations

  • Elysium Academy - Madurai , Anna Nagar
  • Tirunelveli, Xavier Colony
  • Perambalur, Near New Bus Stand
  • Trichy,Thillainagar
  • Theni , NRT Nagar
  • Coimbatore - Hopes
  • Hosur
  • Tiruppur
  • Thoothukudi

Copyright © Elysium Academy | A Part of Elysium Groups

  • Cookie Policy
  • Terms & Condition
  • Terms of Use
  • Privacy Policy
Logo (2)