Skip to content

Instantly share code, notes, and snippets.

Last active Nov 27, 2019
What would you like to do?
package org.demo;
public class Student {
private String id;
private String name;
private Major major = Major.CS;
public String getId() {
return id;
public String getName() {
return name;
public Major getMajor() {
return major;
public void setId(String id) { = id;
public void setName(String name) { = name;
public void setMajor(Major major) {
this.major = major;
enum Major {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment