Posts

Showing posts from February, 2024

HOW TO LEARN CORE JAVA IN 30 DAYS ?

Hey Everyone I am Ganesh the man behind this blog today I will give you full 30 Days Roadmap of How to Learn Core Java In just 30 Days.   Day 1: Java Language Introduction with history  and versions. download JDK and any text    editor. Day 2: Java Keywords, Variables, Data Types, Operators Theory + Practical. Day 3: Decision Making Statements Conditional Statements if, if else, if else ladder, nested if    else. Day 4:  Decision Making Statements Looping Statements  While, Do While, For Loop, For Each Loop. Day 5: Class and Objects. Day 6: All Methods of Core Java.  Day 7:  All Constructor of Java. Day 8: Access Specifier / Access Modifier. Day 9: Super & this keyword. Day 10: Package & import. Day 11: Static Keyword. Day 12: Final keyword. Day 13: New keyword. Day 14: Abstraction (abstract class, Interface). Day 15: Polymorphism(Method Overloading (static binding) / Method Overriding (dynamic binding) Day 16: Inheritance (child...

Custom Exception Program ?

  package ExceptionHandling ; public class CustomExceptionExample extends Exception { CustomExceptionExample() { super("invalid age"); } CustomExceptionExample(String str) { super(str); } static int age = 15; public static void main(String[] args) { try { if ( age < 10) { throw new CustomExceptionExample("Invlid age"); } else { System. out .println("valid age"); } } catch (CustomExceptionExample e) { // TODO Auto-generated catch block System. out .println(e.getMessage()); } } }