Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
17
Task/Classes/Processing/classes-1.processing
Normal file
17
Task/Classes/Processing/classes-1.processing
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
class ProgrammingLanguage
|
||||
{
|
||||
// instance variable:
|
||||
private String name;
|
||||
// constructor (let's use it to give the instance variable a value):
|
||||
public ProgrammingLanguage(String name)
|
||||
{
|
||||
this.name = name;
|
||||
// note use of "this" to distinguish the instance variable from the argument
|
||||
}
|
||||
// a method:
|
||||
public void sayHello()
|
||||
{
|
||||
println("Hello from the programming language " + name);
|
||||
// the method has no argument or local variable called "name", so we can omit the "this"
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue