Java Assignment
Java Assignment
Assignment - 2
Program: BTECH (CSE Data Science and Artificial Intelligence (IBM))
5th Semester
Course Code: CSE504-22
Session: 2024-25
CT University, Ludhiana
Submitted in partial fulfilment of the requirement for the award of the Degree of
Bachelors of Data Science and Artificial Intelligence in Computer Science Engineering
along with IBM
Static binding is being used for Dynamic binding is being used for
overloaded methods. overriding methods.
Private and final methods can be Private and final methods can’t be
Method Overloading Method Overriding
overloaded. overridden.
// Static method
static void staticMethod () {
System.out.println("This is a static method in interface.");
}
}
// File: com/example/test/Main.java
package com.example.test;