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 Slide

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

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

    View Slide

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

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

    View Slide

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

    View Slide

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

    View Slide

  6. "OESPJE

    ֓࿦

    View Slide

  7. "OESPJE
    ͱ͸

    View Slide

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

    View Slide

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

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

    View Slide

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

    View Slide

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

    View Slide

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

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

    View Slide

  13. "OESPJE
    ͷ಺ଆ

    View Slide

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

    View Slide

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

    View Slide

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

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

    View Slide

  17. View Slide

  18. "OESPJE
    ͷ։ൃ

    View Slide

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

    View Slide

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

    View Slide

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

    View Slide

  22. υΩϡϝϯτ
    w IUUQTEFWFMPQFSBOESPJEDPNJOEFYIUNM

    View Slide

  23. ؀ڥ

    ηοτΞοϓ

    View Slide

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

    View Slide

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

    View Slide

  26. ิ଍

    View Slide

  27. ηοτΞοϓ ਪ঑

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

    View Slide

  28. ηοτΞοϓ ਪ঑

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

    View Slide

  29. ୺຤ଆ

    ηοτΞοϓ

    View Slide

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

    View Slide

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

    View Slide

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

    View Slide

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

    View Slide

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

    View Slide

  35. View Slide

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

    View Slide

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

    View Slide

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

    View Slide

  39. )FMMP8PSME

    View Slide

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

    View Slide

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

    View Slide

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

    View Slide

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

    View Slide

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

    View Slide

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

    View Slide

  46. ϓϩδΣΫτͷ࡞੒

    View Slide

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

    View Slide

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

    View Slide

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

    View Slide

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

    View Slide

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

    View Slide

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

    View Slide

  53. )FMMP8PSME

    View Slide

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

    View Slide

  55. +BWB

    View Slide

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

    View Slide

  57. +BWB֓ཁ

    View Slide

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

    View Slide

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

    View Slide

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

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

    View Slide

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

    View Slide

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

    View Slide

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

    View Slide

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

    View Slide


  65. )FMMP8PSME

    View Slide

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

    View Slide

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

    View Slide

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

    View Slide

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

    View Slide

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

    View Slide

  71. ͬ͘͟Γઆ໌

    View Slide

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

    View Slide

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

    View Slide

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

    View Slide

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

    View Slide

  76. Ϋϥε

    View Slide

  77. ˞࣮༻ੑ

    ͔Βͷઆ໌

    View Slide

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

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

    View Slide

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

    View Slide


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

    w JOU ਺ࣈ

    w ͚ͩΛ࢖͏ঢ়گ

    View Slide


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

    View Slide

  82. 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 Slide

  83. 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 Slide

  84. public class Hello {

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

    View Slide

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

    View Slide

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

    View Slide

  87. 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 Slide

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

    View Slide

  89. 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 Slide

  90. 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 Slide

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

    View Slide

  92. 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 Slide

  93. 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 Slide

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

    View Slide

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

    View Slide

  96. * 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 Slide

  97. * 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 Slide

  98. * 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 Slide

  99. 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 Slide

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

    View Slide

  101. 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 Slide

  102. 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 Slide

  103. 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 Slide

  104. 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 Slide

  105. 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 Slide

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

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

    View Slide

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

    View Slide

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



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

    View Slide

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

    View Slide

  110. จ๏

    View Slide

  111. ͔͜͜Β͸HJTU
    IUUQTHJTUHJUIVCDPNOPOZMFOF
    FBGGFGBGDFFBC

    View Slide