Saukakkiyar hanyar rubuta umurni a yaren java shine ta hanyar anfani da text editor,misali notepad,zaka kirkiri file dauke da codes dinnan da zaka gani nan gaba kadan sannan ka tabbata kayi save dinsa a sunanfil.java,umurnin java suna da matuqar buqatar kula sosai,saboda kuskure daya a java ka iya sa code dinka na layi dubu yaqi aiki yanda kakeso,kada kasa karamin baqi wajen babbab baqi haka shime kada kasa babbab baqi wajen karamin baqi,dasauransu.
//misalin aikin java
class Example Program{
public static void main(string[]{
System.out.println("ni saukakken misali ne");
}
ka tabbata kayi save dinsa a .java
misali misali.java .
Wannan misalin umurni ne da zai hada ma program wanda zai rubuta ma "ni saukakken misali ne" a screen.
A wannan misali nayi anfani da salon comment na c++.wannan shi ake kira da single line comment a java,maana idan zakai sharhi na layi daya,abun da yake cewa naura shine..kada ki kula da duk wani rubutu har zuwa karshen layinnan.
Baya ga wannan salon comment din akwai wasu guda biyu kuma.
Nagaba shine/* comment anan*/ shi kuma wannan ana kiransa da double line comment,shi kuma anan anfani dashi wajen yin comment da wuce tsawon layi daya,shi kuma wannan shine salon c programming.
Sai kashi na qarshe wanda ake kira da doc comment wanda shi kuma ana anfani dashi ne wajen rubuta documentation,yanda yake shine /** documentation anan*/.
Kada kuga ba bada maanar documentation ba,na tabbata duk wani mai hada site yasan me nake nufi da haka.
Insha Allah zamui bayanin yanda ake compiling na java code a darasi na biyu.
Idan akwai gyara kofa a bude take danni kain dan koyo ne a yaren java.sai anjima