Skip to content

Instantly share code, notes, and snippets.

@kasundm5566
Created July 1, 2016 04:01
Show Gist options
  • Save kasundm5566/48583b22d635ed3b52ce1e90b347f998 to your computer and use it in GitHub Desktop.
Save kasundm5566/48583b22d635ed3b52ce1e90b347f998 to your computer and use it in GitHub Desktop.
REST-Demo
package hsenid.rest;
import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement // Make this as root element when we represnet data as XML.
public class Student {
private int id;
private String name;
private int age;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getAge() {
return age;
}
public void setAge(int age) {
this.age = age;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment