-
Notifications
You must be signed in to change notification settings - Fork 0
Class declaration
irxground edited this page Sep 9, 2013
·
1 revision
クラス定義
public class User {
private String name;
public String getName() { return name; }
public void setName(String name) { this.name = name; }
public User(String name) {
this.name = name;
}
}
public class User {
public string Name { get; set; }
public User (String name) {
Name = name;
}
}
class User(name: String);
class User
attr_accessor :name
def initialize(name)
@name = name
end
end
User = Struct.new(:name)
<?php
class User {
public $name;
public __construct($name) {
$this->name = $name;
}
}