Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Dot-Art/Collection.java
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
33 lines (30 sloc)
710 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Write a description of class Collection here. | |
* | |
* @author (your name) | |
* @version (a version number or a date) | |
*/ | |
public class Collection | |
{ | |
// instance variables - replace the example below with your own | |
private int x; | |
/** | |
* Constructor for objects of class Collection | |
*/ | |
public Collection() | |
{ | |
// initialise instance variables | |
x = 0; | |
} | |
/** | |
* An example of a method - replace this comment with your own | |
* | |
* @param y a sample parameter for a method | |
* @return the sum of x and y | |
*/ | |
public int sampleMethod(int y) | |
{ | |
// put your code here | |
return x + y; | |
} | |
} |