fork download
  1. import java.util.ArrayList;
  2. import java.util.List;
  3.  
  4. import javax.xml.bind.annotation.XmlAccessType;
  5. import javax.xml.bind.annotation.XmlAccessorType;
  6. import javax.xml.bind.annotation.XmlElement;
  7. import javax.xml.bind.annotation.XmlRootElement;
  8. import javax.xml.bind.annotation.XmlType;
  9.  
  10. /**
  11.  * @author Arktos
  12.  *
  13.  */
  14.  
  15. @XmlRootElement(name = "constants")
  16. @XmlAccessorType(XmlAccessType.FIELD)
  17. @XmlType(name = "constants", propOrder = { "constants" })
  18. public class Constants {
  19.  
  20. @XmlElement(name = "constant")
  21. private List<Constant> constants;
  22.  
  23. public List<Constant> getConstants() {
  24. if(constants == null) {
  25. constants = new ArrayList<Constant>();
  26. }
  27. return constants;
  28. }
  29.  
  30. public void setConstants(List<Constant> constants) {
  31. this.constants = constants;
  32. }
  33. }
  34.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:18: class Constants is public, should be declared in a file named Constants.java
public class Constants {
       ^
Main.java:21: cannot find symbol
symbol  : class Constant
location: class Constants
	private List<Constant> constants;
	             ^
Main.java:23: cannot find symbol
symbol  : class Constant
location: class Constants
	public List<Constant> getConstants() {
	            ^
Main.java:30: cannot find symbol
symbol  : class Constant
location: class Constants
	public void setConstants(List<Constant> constants) {
	                              ^
Main.java:25: cannot find symbol
symbol  : class Constant
location: class Constants
			constants = new ArrayList<Constant>();
			                          ^
5 errors
stdout
Standard output is empty