
I have created the following interface that allows updations to customer information:
public interface validateInfo { public void validate(String empcode, String password); } class updateInfo implements validateInfo { public void update() { //code to update information of customer } public static void main(String a1[]) { updateInfo o= new updateInfo(); p.update(); System.out.println("Information updated"); } }
1.Will this code compile successfully.If not,identify and document the reasons.
2.I also want to check whether the user has entered the value for empcode and password variables.How can i check this out

Java Update Information
interface validateInfo {
public void validate(String empcode, String password);
}
class updateInfo implements validateInfo {
String empcode;
String password;
public void validate(String code,String pass) {
this.empcode=code;
this.password=pass;
}
public static void main(String a1[]) {
updateInfo o= new updateInfo();
o.validate("1111","roseindia");
System.out.println("Information updated");
}
}
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.