KWT-2024/lab/java/sample_class.java
Adam Stelmaszyk 6040e09fa8 finished
2024-06-22 12:22:36 +02:00

30 lines
731 B
Java

/**
* This is a simple Java class demonstrating grammatical errors in comments.
*/
public class SampleClass {
// This is a incorrect comment
private int sampleField;
/**
* This method does something very simple.
* @param value This is a parameter that take a integer value.
*/
public void doSomething(int value) {
// This is a method that does something
sampleField = value;
}
/**
* This method returns the value of sample field.
* It should be a integer value.
* @return the value of sampleField
*/
public int getSampleField() {
// Return the value of the sample field
return sampleField;
}
// Another bad comment here
}