Yadda ake rubuta shiri a Java

Pin
Send
Share
Send

Kowane mai amfani aƙalla sau ɗaya, amma tunani game da ƙirƙirar shirin kansa na musamman wanda zai aiwatar kawai waɗancan ayyuka waɗanda mai amfani da kansa zai tambaya. Hakan zai yi kyau. Don ƙirƙirar kowane shiri kuna buƙatar ilimin kowane yare. Wanne? Kai kaɗai ka zaɓi, saboda dandano da launi na alamomi daban-daban.

Za muyi la’akari da yadda ake rubuta shiri a Java. Java yana ɗaya daga cikin mashahuri kuma yaren tallata yaruka. Don aiki tare da harshe, zamu yi amfani da yanayin shirye-shiryen IntelliJ IDEA. Tabbas, zaku iya ƙirƙirar shirye-shirye a cikin bayanin kula na yau da kullun, amma yin amfani da IDE na musamman har yanzu ya fi dacewa, tunda yanayin da kansa zai nuna muku kurakurai kuma ya taimaka muku shirin.

Zazzage IntelliJ IDEA

Hankali!
Kafin ka fara, tabbatar cewa an sanya sabon sigar Java ɗin da aka shigar.

Zazzage sabuwar sigar Java

Yadda ake shigar IntanetJ IDEA

1. Bi hanyar haɗi da ke sama sai danna Danna;

2. Za a canza ku zuwa zaɓi na sigar. Zaɓi nau'in kyauta na Community kuma jira fayil ɗin zai sauke;

3. Sanya shirin.

Yadda ake amfani da IDEA IntelliJ

1. Gudanar da shirin kuma ƙirƙirar sabon aiki;

2. A cikin taga da ke buɗe, ka tabbata cewa Java ɗin ya zaɓi yaren aikin shirye-shirye kuma danna "Gaba";

3. Danna "Next" kuma. A taga na gaba, saka wurin fayil ɗin da sunan aikin. Danna Gama.

4. An bude taga aikin. Yanzu kuna buƙatar ƙara aji. Don yin wannan, buɗe babban fayil ɗin aikin kuma danna-dama akan babban fayil ɗin src, "New" -> "Class Class".

5. Sanya sunan aji.

6. Kuma yanzu za mu iya ci gaba kai tsaye zuwa shirye-shirye. Yaya ake ƙirƙiri shirin kwamfuta? Abu ne mai sauqi! Kun bude filin gyaran rubutu. Anan ne zamu rubuta lambar shirin.

7. Babban aji ana kirkira ta atomatik. A cikin wannan aji, rubuta hanyar babban abin da ba kowa a ciki (String [] args]) kuma sanya braly braly {}. Kowane aikin dole ne ya ƙunshi babban hanya.

Hankali!
Lokacin rubuta shiri, kuna buƙatar saka idanu sosai a kan ginin kalma. Wannan yana nufin cewa dole ne a rubuta duk umarni daidai, duk buɗaɗɗun buɗe dole ne a rufe, dole ne a sanya semicolon bayan kowane layi. Kar ku damu - muhalli zai taimaka kuma ya buge ku.

8. Tunda muna rubuta mafi sauƙin shirin, ya rage kawai don ƙara umarnin System.out.print ("Sannu, duniya!");

9. Yanzu dama-danna kan aji sunan kuma zaɓi "Run".

10. Idan an yi komai daidai, shigarwar "Sannu, duniya!" Za a nuna a ƙasa.

Taya murna! Ka rubuta shirin Java ɗinku na farko.

Waɗannan sune ainihin mahimman abubuwan shirye-shirye. Idan ka kuduri niyyar koyon yaren, to, zaku iya ƙirƙirar manyan ayyuka da amfani da yawa fiye da sauƙi "Sannu sannu duniya!".
Kuma IntelliJ IDEA zai taimake ku game da wannan.

Zazzage IntelliJ IDEA daga gidan yanar gizon hukuma

Duba kuma: Sauran shirye-shiryen shirye-shirye

Pin
Send
Share
Send