0
Java doubt please help me in a concept because my teacher not help me đđ
Sir one doubt in java concept that interface mai main class bana sakta hu kya and interface mai function declare karke rakhte hai wo as a function prototype define hota hai ya like jaise function call ho raha hai interface A { void disp a(); } Ye abhi normal interface hai so ye function prototype hai method call ho raha hai
3 Answers
0
do you mean
interface A {
//void disp a();
void disp();
}
0
abhishek bairwa
Interface me main class nahi bana sakte.
Interface me sirf method (method prototype) and constant variable defined karte hain. Method ko use karne ke liye interface ko implement karna padta aur implemented class me method override hona chahiye kyonki ek class multiple interface ko implement kar sakta hai
0
Dhanyawad sir