Tuesday, 3 July 2012

Class Interaction example

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

Pass a HashMap from Angular Client to Spring boot API

This example is for the case where fileData is very huge and in json format   let map = new Map<string, string>()      map.set(this.ge...