print 'Hello YKazu'

('Python', 'Javascript')

2016-06-16から1日間の記事一覧

クラスのメソッド

class PyStash: # コンストラクタ def __init__(self): self.git = '/usr/loca/bin/git' # クラスのメソッド # 最低でも1つの仮引数を持つ(インスタンスを指すselfにする慣例) def clone(self): git = self.getGit() url = self.getURL('ssh') # 実引数は…

配列

基本 // 宣言 int years[]; // 領域確保 years = new int[3]; // 初期化 years[0] = 2015; years[1] = 2017; years[2] = 2020; 宣言 + 領域確保 // 宣言 + 領域確保 int years[] = new int[3]; // 初期化 years[0] = 2015; years[1] = 2017; years[2] = 2020…

文字列の連結

public class Main { public static void main(String[] args) { String a = 'Hello'; String b = 'Yoshida'; // +で連結 System.out.println(a + ' ' + b); } }