Class Interaction
package com.demo;
public class VideoConfig {
VideoConfig configdata;
String public_key;
String private_key;
public String getPublic_key() {
return public_key;
}
public void setPublic_key(String public_key) {
this.public_key = public_key;
}
public String getPrivate_key() {
return private_key;
}
public void setPrivate_key(String private_key) {
this.private_key = private_key;
}
}
package com.demo;
public class VideoConfigMng {
public static void main(String[] args) {
VideoConfigMng sample;
VideoConfig configobj;
VideoConfig configdata = new VideoConfig();
configdata.setPrivate_key("pri");
configdata.setPrivate_key("pri");
configobj = configdata;
VideoUploadImpl obj_impl = new VideoUploadImpl(configdata);
System.out.println("output "+configobj.getPrivate_key());
}
}
package com.demo;
public class VideoUploadImpl {
VideoConfig mconfigObj;
public VideoUploadImpl(VideoConfig configobj) {
mconfigObj = configobj;
System.out.println("output in contructor is"+mconfigObj.getPrivate_key());
}
}
No comments:
Post a Comment