You need to sign in to do that
Don't have an account?
111
i got the hello.cls,and then how can i use method of Message.cls?
i get the error message
Method is not visible: [s.Message].setM1(String) |
i got the hello.cls,and then how can i use method of Message.cls?
for example
file 1 (hello.cls)
global class Hello {
WebService static String sayHelloWorld() {
Message message = new Message();
message.setM1('d');
return message.getM1();
}
}
Message message = new Message();
message.setM1('d');
return message.getM1();
}
}
file 2 ( Message.cls)
public class Message {
String M1 = 'Hello world';
String M2 = 'Hello USA';
void setM1(String argM1) {
String M1 = 'Hello world';
String M2 = 'Hello USA';
void setM1(String argM1) {
M1 = argM1;
}
void setM2(String argM2) {
}
void setM2(String argM2) {
M2 = argM2;
}
String getM1(){
return M1;
}
String getM2(){
return M2;
}
}
String getM1(){
return M1;
}
String getM2(){
return M2;
}
}
You might want to invest a little time reading some of the apex docs.
http://wiki.apexdevnet.com/index.php/Apex_and_Visualforce#Apex