Upgrade to Pro — share decks privately, control downloads, hide ads and more …

androidアプリを作る 第1・2回

nonylene
October 30, 2016

androidアプリを作る 第1・2回

nonylene

October 30, 2016
Tweet

More Decks by nonylene

Other Decks in Technology

Transcript

  1. "OESPJEΞϓϦΛ࡞Δ

    ,.$OPOZMFOF
    ɾ֓࿦ɾηοτΞοϓɾ+BWB લ൒

    View full-size slide

  2. ࣗݾ঺հ
    w OPOZMFOF ͷʹΕΜ

    w ,.$ճ
    w ΧʔϏΟͰ͢
    w ͋ͭΊͯΧʔϏΟྑ͍Ͱ͢

    View full-size slide

  3. ࣗݾ঺հ
    w OPOZMFOF ͷʹΕΜ

    w εϚϗΞϓϦͱ͔
    w 5XJUUFS(JU)VCFUD
    w IUUQOPOZMFOFIBUFOBCMPHKQ

    View full-size slide

  4. ͜ͷεϥΠυ
    w ॳΊͷि෼Λ·ͱΊͨ΋ͷ

    View full-size slide

  5. ࠓ೔΍Δ͜ͱ
    "OESPJE֓࿦
    ؀ڥηοτΞοϓ
    IFMMPXPSME
    +BWB લ൒

    View full-size slide

  6. "OESPJE

    ֓࿦

    View full-size slide

  7. "OESPJEͱ͸
    w (PPHMF͕։ൃ͍ͯ͠Δ04
    w Φʔϓϯιʔε
    w εϚʔτϑΥϯɺλϒϨοτ޲͚
    w ࠷৽͸ /PVHBU

    View full-size slide

  8. "OESPJEͱ͸
    w ಛ௃
    w ແྉʢಛڐྉআ͘ʣ
    w ͍ΖΜͳϝʔΧʔ
    w 9QFSJB 40/:
    (BMBYZ 4BNTVOH

    /FYVT (PPHMFͷ0&.
    )5$ FUD
    w ൺֱతࣗ༝౓͕ߴ͍ʢεϚʔτϑΥϯͷதͰ͸ʣ

    View full-size slide

  9. ଞͷ04
    w J04
    w ೔ຊͰ͸γΣΞͰ͔͍
    w BOESPJEͷӬԕͷϥΠόϧ

    View full-size slide

  10. ଞͷ04
    w 8JOEPXT1IPOF
    w /0,*"ͱ)5$͙Β͍ʜ
    w ͱࢥͬͨΒ࠷ۙ೔ຊͰ࡞ΒΕͯΔ
    w 7"*01IPOF."%04."FUD

    View full-size slide

  11. "OESPJE։ൃ
    w جຊແྉ
    w Φʔϓϯιʔε
    w *%& "OESPJE4UVEJP

    w ΤϛϡϨʔλ
    w 1MBZ4UPSFʹެ։͢Δࡍ͸L

    View full-size slide

  12. "OESPJE
    ͷ಺ଆ

    View full-size slide

  13. "OESPJEͷ಺෦
    w -JOVYΧʔωϧΛ࠾༻
    w TIFMMʹೖΔͱίϚϯυ࢖͑Δ
    w ಺෦͸Φʔϓϯιʔε
    w IUUQTBOESPJEHPPHMFTPVSDFDPN

    View full-size slide

  14. "OESPJEΞϓϦ͕ಈ͘·Ͱ
    w KBWBϑΝΠϧ͔ΒKBWBDͰDMBTTϑΝΠϧ
    w KBWBͷόΠτίʔυ
    w DMBTTϑΝΠϧ͔ΒEYͰEFYϑΝΠϧ
    w EBMWJLͷόΠτίʔυ
    .java .class .dex
    javac dx

    View full-size slide

  15. "OESPJEΞϓϦ͕ಈ͘·Ͱ
    w %BMWJL7.
    w +7.Ͱ͸ͳ͍
    w d"OESPJE
    w "35 "OESPJE3VOUJNF

    w EFYΛ༧ΊίϯύΠϧͳͲˠૣ͍ʂྑ͍ʂ
    w "OESPJEd

    View full-size slide

  16. "OESPJE
    ͷ։ൃ

    View full-size slide

  17. ։ൃ؀ڥ
    w +BWB
    w ਖ਼֬ʹ͸"OESPJE+BWB
    w "OESPJE/͔Β͸0QFO+%,KBWB

    View full-size slide

  18. ։ൃ؀ڥ
    w "OESPJE4UVEJP
    w *OUFMMJ+ϕʔε
    w 8JOEPXTNBD-JOVY
    w ແྉ
    w FDMJQTF͸αϙʔτऴྃ

    View full-size slide

  19. 04όʔδϣϯ
    w ݹ͍όʔδϣϯ͕ݱ໾
    w ࠷৽ͷ"1*͕࢖͑ͳ͍౳
    w Ҏ্ఔ౓͕Φεεϝ
    ˞ӈͷද͸൒೥લ

    View full-size slide

  20. υΩϡϝϯτ
    w IUUQTEFWFMPQFSBOESPJEDPNJOEFYIUNM

    View full-size slide

  21. ؀ڥ

    ηοτΞοϓ

    View full-size slide

  22. ηοτΞοϓ
    1$ηοτΞοϓ
    ิ଍
    ୺຤ଆηοτΞοϓ
    )FMMP8PSME

    View full-size slide

  23. 1$ηοτΞοϓ
    w "OESPJE4UVEJPೖΕΔ͚ͩ
    w ΑΓ0QFO+%,ಉࠝ
    w "OESPJEͷ4%,ಉࠝ
    w IUUQTEFWFMPQFSBOESPJEDPNTUVEJP
    JOEFYIUNM

    View full-size slide

  24. ηοτΞοϓ ਪ঑

    w (FOZNPUJPO
    w ૉૣ͍ΤϛϡϨʔλ
    w ඇ঎༻Ͱ͸ແྉ
    w 7JSUVBM#PY͕ඞཁ
    w IUUQTXXXHFOZNPUJPODPNGVO[POF

    View full-size slide

  25. ηοτΞοϓ ਪ঑

    w "%#Λ1"5)ʹ௥Ճ
    w "OESPJEΛ1$͔Βૢ࡞͢Δπʔϧ
    w *OTUBMMVOJOTUBMMFUD
    w ίϯιʔϧ͔ΒBEC͕࢖͑ΔΑ͏ʹ

    View full-size slide

  26. ୺຤ଆ

    ηοτΞοϓ

    View full-size slide

  27. 64#σόοά
    w ։ൃऀ޲͚ͷϞʔυ
    w BECίϚϯυΛୟ͚ΔΑ͏ʹͳΔ
    w 1$͔Β"OESPJEΛૢ࡞͢Δ
    w ΤϛϡϨʔλͰ͸0/ʹͳ͍ͬͯΔ͸ͣ

    View full-size slide

  28. 64#σόοά༗ޮ
    ઃఆΛ։͘

    View full-size slide

  29. 64#σόοά༗ޮ
    ୺຤৘ใΛ։͘

    View full-size slide

  30. 64#σόοά༗ޮ
    Ϗϧυ൪߸Λ࿈ଧ

    View full-size slide

  31. 64#σόοά༗ޮ
    Ϗϧυ൪߸Λ࿈ଧ

    View full-size slide

  32. 64#σόοά༗ޮ
    b։ൃऀ޲͚Φϓγϣϯ`ొ৔

    View full-size slide

  33. 64#σόοά༗ޮ
    64#σόοάΛ0/

    View full-size slide

  34. 1$ʹ઀ଓ
    w ୺຤ʹ"%#ڐՄը໘͕ग़ͨΒڐՄ
    w υϥΠόͷ֤ʑ͕ඞཁ͔΋

    View full-size slide

  35. )FMMP8PSMEͷྲྀΕ
    w ϓϩδΣΫτΛ࡞੒͢Δ
    w ίϯύΠϧ࣮ͯ͠ߦ
    w )FMMP8PSME

    View full-size slide

  36. ϓϩδΣΫτͷ࡞੒
    w l4UBSUBOFX"OESPJE4UVEJPQSPKFDUz

    View full-size slide

  37. ϓϩδΣΫτͷ࡞੒
    w )FMMP8PSMEΞϓϦ
    w $PNQBOZ%PNBJO͸ద౰ʹ ྫKQLND

    View full-size slide

  38. ϓϩδΣΫτͷ࡞੒
    w 1IPOFBOE5BCMFU"OESPJEҎ্

    View full-size slide

  39. ϓϩδΣΫτͷ࡞੒
    w &NQUZ"DUJWJUZΛબ୒

    View full-size slide

  40. ϓϩδΣΫτͷ࡞੒
    w ͦͷ··pOJTI͠͹Β͘଴ͭ

    View full-size slide

  41. ϓϩδΣΫτͷ࡞੒

    View full-size slide

  42. "OESPJE4UVEJPઃఆ
    w *OTUBOU3VOΛEJTBCMF
    w ϗοτεϫοϓʹΑΓߴ଎ʹมߋΛద༻͢Δػೳ
    w ·ͩ͸·Δ͜ͱ͕ଟ͍ͷͰEJTBCMF

    View full-size slide

  43. "OESPJE4UVEJPઃఆ
    w ઃఆ#VJME*OTUBOU3VOΛEJTBCMF

    View full-size slide

  44. )FMMP8PSME
    w 3VObBQQ`ΛΫϦοΫ

    View full-size slide

  45. )FMMP8PSME
    w ΠϯετʔϧઌΛબ୒
    ઀ଓதͷσόΠε

    View full-size slide

  46. )FMMP8PSME
    w ΠϯετʔϧઌΛબ୒
    ΤϛϡϨʔλ

    View full-size slide

  47. )FMMP8PSME
    w ิ଍
    w (FOZNPUJPOͷਓ͸ࣗ෼Ͱىಈͤ͞Δ
    w ϓϥάΠϯ΋͋Γ·͢
    w *OUFM)"9.ͷΠϯετʔϧΛٻΊΒΕΔ͜ͱ΋
    w ը໘ʹैͬͯΠϯετʔϧ

    View full-size slide

  48. ηοτΞοϓ׬ྃ
    w ͓ർΕ༷Ͱͨ͠

    View full-size slide

  49. +BWB
    +BWBʹ͍ͭͯ
    Ϋϥεͱ͸
    จ๏
    ͦͷଞ͍Ζ͍Ζ

    View full-size slide

  50. +BWB֓ཁ
    w "OESPJE+BWBͰ͸ͳ͘+BWBͷ֓ཁ

    View full-size slide

  51. +BWBͱ͸
    w ΦϒδΣΫτࢦ޲ϓϩάϥϛϯάݴޠ
    w 4VO͕։ൃɺݱࡏ͸0SBDMF
    w ࠷৽όʔδϣϯ͸+BWB4&
    w ϥϜμࣜͷαϙʔτ౳

    View full-size slide

  52. +BWBͱ͸
    w +7. +BWB7JSUVBM.BDIJOF

    w +BWBͷ࣮ߦ؀ڥ
    w KBWBDͰίϯύΠϧ͞ΕͨόΠτίʔυΛ࣮ߦ
    w 04ͷґଘੑΛऔΓআ͘
    w l8SJUFPODF SVOBOZXIFSFz

    View full-size slide

  53. +BWBͱ͸
    w KBWBϑΝΠϧΛKBWBDͰίϯύΠϧ
    w όΠτίʔυ DMBTTϑΝΠϧ
    ͷੜ੒

    View full-size slide

  54. +BWBͱ͸
    w όΠτίʔυΛ֤؀ڥͷ+7.Ͱ࣮ߦ
    ˞"OESPJE͸όΠτίʔυΛ௚઀࣮ߦ͠ͳ͍

    View full-size slide

  55. ิ଍
    w +BWBͱ+BWB4DSJQU͸શ͘ҧ͏΋ͷ
    w +BWB͕ྲྀߦ͔ͬͯͨΒࣅ໊ͨલʹͳ͚ͬͨͩ
    ʺ

    View full-size slide

  56. ิ଍
    w "OESPJE͸͍ΘΏΔʮ+BWB΋Ͳ͖ʯ
    w ίʔυΛॻ͘෼ʹ͸+BWBͱΈͳͯ͠ྑ͍
    w ৄࡉIUUQRVFTFSBIBUFOBCMPHKQFOUSZ

    View full-size slide


  57. )FMMP8PSME

    View full-size slide

  58. 8JOEPXTͰͷ+BWB
    w λʔϛφϧ্Ͱ+BWB+BWBDΛಈ͔͢৔߹
    w +%,ΛΠϯετʔϧ͢Δ
    w IUUQXXXKBWBESJWFKQJOTUBMM
    w "OESPJE4UVEJPಉࠝͷ+%,Λ࢖͏
    • C:\Program Files\Android\Android
    Studio\jre\bin\java.exe

    View full-size slide

  59. w ͱΓ͋͑ͣ)FMMP8PSME
    • Hello.java
    )FMMP8PSME
    public class Hello {
    public static void main(String[] args) {
    System.out.println("Hello, world!");
    }
    }

    View full-size slide

  60. )FMMP8PSME
    $ javac Hello.java
    $ ls
    > Hello.class Hello.java
    $ java Hello
    > Hello, world!
    ˡίϯύΠϧ

    View full-size slide

  61. )FMMP8PSME
    $ javac Hello.java
    $ ls
    > Hello.class He…
    $ java Hello
    > Hello, world!
    ˡόΠτίʔυ

    View full-size slide

  62. )FMMP8PSME
    $ javac Hello.java
    $ ls
    > Hello.class Hello.java
    $ java Hello
    > Hello, world!
    ˡ࣮ߦ

    View full-size slide

  63. ͬ͘͟Γઆ໌

    View full-size slide

  64. • Hello.java
    • Hello Ϋϥεͷએݴ
    )FMMP8PSME
    public class Hello {
    public static void main(String[] args) {
    System.out.println("Hello, world!");
    }
    }

    View full-size slide

  65. • Hello.java
    • main ϝιου(≒ؔ਺)ͷએݴ
    )FMMP8PSME
    public class Hello {
    public static void main(String[] args) {
    System.out.println("Hello, world!");
    }
    }

    View full-size slide

  66. • Hello.java
    • System.out.println ϝιουΛݺͼग़͠
    )FMMP8PSME
    public class Hello {
    public static void main(String[] args) {
    System.out.println("Hello, world!");
    }
    }

    View full-size slide

  67. public class Hello {
    public static void main(String[] args) {
    String hello = "Hello, world!”;
    System.out.println(hello);
    }
    }
    • Hello.java
    • hello ม਺ Λ࡞੒
    )FMMP8PSME

    View full-size slide

  68. ˞࣮༻ੑ

    ͔Βͷઆ໌

    View full-size slide

  69. Ϋϥεͱ͸ʁ
    w 㲈ܕ KBWBͷ৔߹

    w ॲཧ΍ม਺Λͻͱ·ͱΊʹͨ͠΋ͷ
    w େ఍ɺػೳຖʹΫϥεΛ࡞Δ

    View full-size slide

  70. Ϋϥεͷ͍͍ͱ͜Ζ
    w ୔ࢁม਺࣋ͪӡͿͷͭΒ͍ͷͰΫϥεͰҰؾʹ
    w ϝιου୔ࢁॻ͘ͷͭΒ͍ͷͰΫϥεʹ·ͱΊΔ
    w ΫϥεʹೖΕͨม਺ͷॲཧ͸ΫϥεͷதͰ
    w 4USJOH΍JOU͚ͩͩͱม਺͕Կҙຯͯ͠Δ͔෼͔Β
    ͳ͍ͷͰΫϥεʹ

    View full-size slide


  71. w ͱΓ͋͑ͣ
    w 4USJOH จࣈྻ

    w JOU ਺ࣈ

    w ͚ͩΛ࢖͏ঢ়گ

    View full-size slide


  72. w ອըΛ؅ཧ͍ͨ͠
    w ອըͷऔಘɾએ఻༻จॻ࡞੒ɾFUDʜ

    View full-size slide

  73. public class Hello {

    public static void printManga(
    String title,
    String author,
    String company,
    String bland,
    String volumeName,
    int price,
    String description,
    String obi) {
    System.out.println(author + "ͷ" + title +
    volumeName + "! " + company + bland + “ࣾӡΛ͔͚ͨ௒େ࡞!: \n
    આ໌͸ͪ͜Β” + description + obi + “஋ஈ͸” + price);
    }
    }
    એ఻༻จॻΛ࡞੒͢ΔϝιουΛ࡞Δ

    View full-size slide

  74. public class Hello {

    public static void printManga(
    String title,
    String author,
    String company,
    String bland,
    String volumeName,
    int price,
    String description,
    String obi) {
    System.out.println(author + "ͷ" + title +
    volumeName + "! " + company + bland + “ࣾӡΛ͔͚ͨ௒େ࡞!: \n
    આ໌͸ͪ͜Β” + description + obi + “஋ஈ͸” + price);
    }
    }
    એ఻༻จॻΛ࡞੒͢ΔϝιουΛ࡞Δ
    ˡඞཁͳม਺ୡ

    View full-size slide

  75. public class Hello {

    public static String getTitleFromServer(Server
    server) {
    server.getTitle().trim()
    }
    public static String getAuthorFromServer(Server
    server) {
    server.getAuthor().trim()
    }
    publ...
    }
    ອըσʔλΛαʔόʔ͔Β࣋ͬͯདྷΔ
    ˢ4USJOHҰͭͣͭஸೡʹฦ͢ϝιουΛ࡞Δ

    View full-size slide

  76. public class Hello {
    public static void main(String[] args) {
    // server ͸ͳ͍͚Ͳઆ໌ͷͨΊ
    String title = getTitleFromServer(server);
    String author = getAuthorFromServer(server);
    Str…
    printManga(title, author, compa…);
    }
    ...
    }
    αʔόʔ͔Β͖࣋ͬͯͨ΋ͷΛએ఻༻จॻʹ͢Δ
    ˢม਺ΛҰͭҰͭऔಘ

    View full-size slide

  77. public class Hello {
    public static void main(String[] args) {
    // server ͸ͳ͍͚Ͳઆ໌ͷͨΊ
    String title = getTitleFromServer(server);
    String author = getAuthorFromServer(server);
    Str…
    printManga(title, author, compa…);
    }
    ...
    }
    αʔόʔ͔Β͖࣋ͬͯͨ΋ͷΛએ఻༻จॻʹ͢Δ
    ˢม਺ΛҰͭҰͭϝιουʹೖΕ͍ͯ͘

    View full-size slide

  78. public class Hello {
    public static void main(String[] args) {
    String title = getTitleFromServer(server);
    String author = getAuthorFromServer(server);
    Str…
    printManga(title, author, compa…);
    }
    public static void printManga(
    String title,
    String author,
    String company,
    String bland,
    String volumeName,
    int price,
    String description,
    String obi) {
    System.out.println(author + "ͷ" + title + volumeName + "! " + company + bland + “ࣾӡ
    Λ͔͚ͨ௒େ࡞!: \n આ໌͸ͪ͜Β” + description + obi + “஋ஈ͸” + price);
    }
    public static String getTitleFromServer(Server server) {
    server.getTitle()
    }
    public static String getAuthorFromServer(Server server) {
    server.getAuthor()
    }
    pub…
    ...
    }
    ·ͱΊΔ

    View full-size slide

  79. ཁ݅௥Ճ
    w ʮҧ͏એ఻จষ΋ग़ͯ͠΄͍͠ΜͩΑͶʯ

    View full-size slide

  80. public class Hello {

    public static void printMangaShort(
    String title,
    //String author,
    //String company,
    //String bland,
    //String volumeName,
    int price,
    //String description,
    //String obi
    ) {
    System.out.println(titile + " Ձ֨: " + price);
    }
    }
    ୹͍એ఻จষͷ௥Ճ
    ˡཁΒͳ͍΋ͷ͸

    ίϝϯτΞ΢τ

    View full-size slide

  81. public class Hello {
    public static void main(String[] args) {
    String title = getTitleFromServer(server);
    String author = getAuthorFromServer(server);
    Str…
    printManga(title, author, compa…);
    printMangaShort(title, price);
    }
    public static void printManga(
    String title,
    String author,
    String company,
    String bland,
    String volumeName,
    int price,
    String description,
    String obi) {
    System.out.println(author + "ͷ" + title + volumeName + "! " + company + bland +
    “ࣾӡΛ͔͚ͨ௒େ࡞!: \n આ໌͸ͪ͜Β” + description + obi + “஋ஈ͸” + price);
    }
    public static String getTitleFromServer(Server server) {
    server.getTitle()
    }
    public static String getAuthorFromServer(Server server) {
    server.getAuthor()
    }
    pub…
    public static void printMangaShort(
    String title,
    //String author,
    //String company,
    //String bland,
    //String volumeName,
    int price,
    //String description,
    //String obi
    ) {
    System.out.println(titile + " Ձ֨: " + price);
    }
    }
    ·ͱΊΔ

    View full-size slide

  82. ཁ݅௥Ճ
    w ʮ͋ɺ͋ͱॳΊ͔Β͙ͭΒ͍ອըஔ͍ͯͯ
    ΄͍͠ʯ

    View full-size slide

  83. public class Hello {
    public static void main(String[] args) {
    String manga1Title = "ΏΔΏΓ";
    String manga1Author = "ͳ΋Γ";
    Str...
    String manga2Title = "ΏΏࣜ";
    String manga2Author = "ࡾ্খຢ";
    Str...
    printManga(manga1Title,
    manga1Author,
    ...
    );
    printMangaShort(manga1Title, manga1Price);
    printManga(manga2Title,
    manga2Author,
    ...
    );
    ॳظອը௥Ճ
    ˡ֤ม਺௥Ճ

    View full-size slide

  84. public class Hello {
    public static void main(String[] args) {
    String manga1Title = "ΏΔΏΓ";
    String manga1Author = "ͳ΋Γ";
    Str...
    String manga2Title = "ΏΏࣜ";
    String manga2Author = "ࡾ্খຢ";
    Str...
    printManga(manga1Title,
    manga1Author,
    ...
    );
    printMangaShort(manga1Title, manga1Price);
    printManga(manga2Title,
    manga2Author,
    ...
    );
    ॳظອը௥Ճ
    ˡQSJOU

    View full-size slide

  85. ̷̸̴ʙ͇̓̈́
    w զʑ͸Կߦ͜ͷϑΝΠϧΛॻ͍͍ͯ͘ͷ͔
    w ॳΊͷອը͕ͭ૿͑ͨΒߦ૿͑Δ
    w ϝιουͷҾ਺Λຖճॻ͍͍ͯ͘ͷ͔
    w ອըͷཁૉ૿͑ͨΒͲ͏͢Δͷ͔
    w ग़൛೥ച্ײ૝FUD

    View full-size slide

  86. ͜͜ͰΫϥεͷొ৔
    w ࠓճ͸Manga ΫϥεΛఆٛ͢Δ

    View full-size slide

  87. * Manga.java
    public class Manga {
    private String title;
    private String author;
    private String company;
    private String bland;
    private String volumeName;
    private int price;
    private String description;
    private String obi;
    public Manga(String title, String author, String company,
    String bland, String volumeName, int price,
    String description, String obi) {
    this.title = title;
    this.author = author;
    this.company = company;
    this.bland = bland;
    this.volumeName = volumeName;
    this.price = price;
    this.description = description;
    this.obi = obi;
    }
    }
    ˡ֤ม਺ʢϝϯόม਺ʣ

    View full-size slide

  88. * Manga.java
    public class Manga {
    private String title;
    private String author;
    private String company;
    private String bland;
    private String volumeName;
    private int price;
    private String description;
    private String obi;
    public Manga(String title, String author, String company,
    String bland, String volumeName, int price,
    String description, String obi) {
    this.title = title;
    this.author = author;
    this.company = company;
    this.bland = bland;
    this.volumeName = volumeName;
    this.price = price;
    this.description = description;
    this.obi = obi;
    }
    }
    ˣੜ੒ɾॳظԽʢίϯετϥΫλʣ

    View full-size slide

  89. * Manga.java
    public class Manga {
    private String title;
    private String author;
    private String company;
    private String bland;
    private String volumeName;
    private int price;
    private String description;
    private String obi;
    public Manga(String title, String author, String company,
    String bland, String volumeName, int price,
    String description, String obi) {
    this.title = title;
    this.author = author;
    this.company = company;
    this.bland = bland;
    this.volumeName = volumeName;
    this.price = price;
    this.description = description;
    this.obi = obi;
    }
    }
    ˡϝϯόม਺

    ʹ୅ೖ

    View full-size slide

  90. public class Manga {

    public void print() {
    System.out.println(author + "ͷ" + title +
    volumeName + "! " + company + bland +
    “ࣾӡΛ͔͚ͨ௒େ࡞!: \n આ໌͸ͪ͜Β” + description + obi +
    “஋ஈ͸” + price);
    }
    public void printShort() {
    System.out.println(titile + " Ձ֨: " + price);
    }
    }
    ˣΫϥε಺ͷม਺ΛಡΜͰprint

    View full-size slide

  91. w ͜ΕΛHelloΫϥε಺Ͱ࢖͏
    w MangaΦϒδΣΫτΛ࡞੒͠ɺϝιουΛݺͿ
    w Ϋϥεఆٛʢઃܭਤʣ
    w ΦϒδΣΫτ࣮ࡍͷσʔλ
    .BOHBΫϥε׬੒

    View full-size slide

  92. public class Hello {
    public static void main(String[] args) {
    Manga yuruyuri = new Manga("ΏΔΏΓ", "ͳ΋Γ", ...);
    Manga yuyushiki = new Manga("ΏΏࣜ", "ࡾ্খຢ", ...);
    yuruyuri.print();
    yuruyuri.printShort();
    yuyushiki.print();
    yuyushiki.printShort();
    // server ͳΜͯ΋ͷ͸ͳ͍͚Ͳઆ໌ͷͨΊ
    Manga manga = server.getManga();
    manga.print();
    manga.printShort();
    }
    }
    ˢMangaΦϒδΣΫτΛ
    ࡞੒ɾॳظԽ

    View full-size slide

  93. public class Hello {
    public static void main(String[] args) {
    Manga yuruyuri = new Manga("ΏΔΏΓ", "ͳ΋Γ", ...);
    Manga yuyushiki = new Manga("ΏΏࣜ", "ࡾ্খຢ", ...);
    yuruyuri.print();
    yuruyuri.printShort();
    yuyushiki.print();
    yuyushiki.printShort();
    // server ͳΜͯ΋ͷ͸ͳ͍͚Ͳઆ໌ͷͨΊ
    Manga manga = server.getManga();
    manga.print();
    manga.printShort();
    }
    }
    ˢMangaΦϒδΣΫτ

    View full-size slide

  94. public class Hello {
    public static void main(String[] args) {
    Manga yuruyuri = new Manga("ΏΔΏΓ", "ͳ΋Γ", ...);
    Manga yuyushiki = new Manga("ΏΏࣜ", "ࡾ্খຢ", ...);
    yuruyuri.print();
    yuruyuri.printShort();
    yuyushiki.print();
    yuyushiki.printShort();
    // server ͳΜͯ΋ͷ͸ͳ͍͚Ͳઆ໌ͷͨΊ
    Manga manga = server.getManga();
    manga.print();
    manga.printShort();
    }
    }
    ˡMangaΫϥεʹఆٛ͞Εͨ
    ϝιουΛݺͿ

    View full-size slide

  95. public class Hello {
    public static void main(String[] args) {
    Manga yuruyuri = new Manga("ΏΔΏΓ", "ͳ΋Γ", ...);
    Manga yuyushiki = new Manga("ΏΏࣜ", "ࡾ্খຢ", ...);
    yuruyuri.print();
    yuruyuri.printShort();
    yuyushiki.print();
    yuyushiki.printShort();
    // server ͳΜͯ΋ͷ͸ͳ͍͚Ͳઆ໌ͷͨΊ
    Manga manga = server.getManga();
    manga.print();
    manga.printShort();
    }
    }
    ˡMangaΫϥεʹఆٛ͞Εͨ
    ϝιουΛݺͿ

    View full-size slide

  96. public class Hello {
    public static void main(String[] args) {
    Manga yuruyuri = new Manga("ΏΔΏΓ", "ͳ΋Γ", ...);
    Manga yuyushiki = new Manga("ΏΏࣜ", "ࡾ্খຢ", ...);
    yuruyuri.print();
    yuruyuri.printShort();
    yuyushiki.print();
    yuyushiki.printShort();
    // server ͳΜͯ΋ͷ͸ͳ͍͚Ͳઆ໌ͷͨΊ
    Manga manga = server.getManga();
    manga.print();
    manga.printShort();
    }
    }
    ˢMangaΦϒδΣΫτ͝ͱ

    αʔόʔ͔Βऔಘ
    ˞serverͰ͸MangaΦϒδΣΫτΛ࡞ͬͯฦ͢ॲཧΛॻ͍͍ͯΔͱ͢Δ

    View full-size slide

  97. ศར
    w HelloΫϥεͰ͸MangaΫϥεͷϝιου
    Λݺͼग़͚ͩ͢
    w Mangaͷཁૉ͕૿͑ͯ΋Manga಺Λ

    มߋ͢Ε͹ྑ͍
    w Mangaͷ಺෦ͷม਺͸Hello͸஌Βͳ͍

    View full-size slide

  98. ศར
    w Ξχϝ#%Λ؅ཧ͢Δ͜ͱʹͳͬͯ΋ʜ
    w AnimeBDΫϥεΛ࡞Δ
    w HelloΫϥε಺ͰAnimeBDΦϒδΣΫτΛ࡞੒
    w ΦϒδΣΫτͷϝιουΛୟ͘

    View full-size slide

  99. KBWBͰ͸
    w Ұ෦Λআ͍ͯશͯΦϒδΣΫτͰߏ੒
    w int / char / boolean ͳͲϓϦϛςΟϒܕͭҎ֎
    w จࣈྻ String
    ΋ΦϒδΣΫτ



    ˠΦϒδΣΫτࢦ޲ 001
    ݴޠ
    String k = "KMC";
    k.length();
    k.replace("K", "O");

    View full-size slide

  100. ͱΓ͋͑ͣ
    w ॻ͍ͯͨΒͳΜͱͳ͘෼͔ͬͯ͘Δ
    w ͜͏͍͏ͷ͕ඞཁͳΜͩͳ͋ఔ౓Ͱ0,

    View full-size slide

  101. ͔͜͜Β͸HJTU
    IUUQTHJTUHJUIVCDPNOPOZMFOF
    FBGGFGBGDFFBC

    View full-size slide