Membalik isi Variabel
Assalamualaikum WR WB
Selamat malam akhi ukhti semua, salam sehat sealu dan semangat belajar. Malam ini ane mau berbagi ilmu tentang java, yaitu membalik isi variabel secara sederhana.
berikut source code nya:
berikut source code nya:
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package Tugas_coba;
/**
*
* @author pradikta
*/
public class Tugas1 {
public static void main(String[]okky){
int a = 7;
int b = 4;
System.out.println("Hasilnya dibalik");
System.out.println(a);
System.out.println(b);
System.out.println("variabel a = " + b);
System.out.println("Variabel b = " + a);
}
}
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package Tugas_coba;
/**
*
* @author pradikta
*/
public class Tugas1 {
public static void main(String[]okky){
int a = 7;
int b = 4;
System.out.println("Hasilnya dibalik");
System.out.println(a);
System.out.println(b);
System.out.println("variabel a = " + b);
System.out.println("Variabel b = " + a);
}
}
Monggo di coba dan di modifikasi.
berikut adalah hasil printscr nya

Comments
Post a Comment