-
05-21-2014, 07:00 AM #11Junior Member
- Ngày tham gia
- Apr 2016
- Bài viết
- 0
xem mình hộ bài này với, mình kết hợp với các bài khác làm xem ho minh có đúng không
<div class="bbcodeblock bbcodequote bbcmspoilerblock">
<div class="attribution type"><noscript>bài tập (move your mouse to reveal the content)</noscript>
bài tập (open)
bài tập (close)
</div>
<div class="quotecontent">
<div class="bbcm_spoiler_noscript"><blockquote></blockquote></div>
</div>
</div>
Mã nguồn PHP:[color=#000000]
import java[/color][color=#007700].[/color][color=#0000bb]io[/color][color=#007700].[/color][color=#0000bb]file[/color][color=#007700];[/color][color=#0000bb]import java[/color][color=#007700].[/color][color=#0000bb]io[/color][color=#007700].[/color][color=#0000bb]fileinputstream[/color][color=#007700];[/color][color=#0000bb]import java[/color][color=#007700].[/color][color=#0000bb]io[/color][color=#007700].[/color][color=#0000bb]fileoutputstream[/color][color=#007700];[/color][color=#0000bb]import java[/color][color=#007700].[/color][color=#0000bb]io[/color][color=#007700].[/color][color=#0000bb]ioexception[/color][color=#007700];[/color][color=#0000bb]import java[/color][color=#007700].[/color][color=#0000bb]io[/color][color=#007700].[/color][color=#0000bb]objectinput[/color][color=#007700];[/color][color=#0000bb]import java[/color][color=#007700].[/color][color=#0000bb]io[/color][color=#007700].[/color][color=#0000bb]objectinputstream[/color][color=#007700];[/color][color=#0000bb]import java[/color][color=#007700].[/color][color=#0000bb]io[/color][color=#007700].[/color][color=#0000bb]objectoutputstream[/color][color=#007700];[/color][color=#0000bb]import java[/color][color=#007700].[/color][color=#0000bb]io[/color][color=#007700].[/color][color=#0000bb]serializable[/color][color=#007700];[/color][color=#0000bb]import java[/color][color=#007700].[/color][color=#0000bb]util[/color][color=#007700].[/color][color=#0000bb]scanner[/color][color=#007700];public class [/color][color=#0000bb]objectsinhvien [/color][color=#007700]{public static [/color][color=#0000bb]void main[/color][color=#007700]([/color][color=#0000bb]string[/color][color=#007700][] [/color][color=#0000bb]args[/color][color=#007700])[/color][color=#0000bb]throws ioexception[/color][color=#007700], [/color][color=#0000bb]classnotfoundexception[/color][color=#007700]{[/color][color=#0000bb]scanner sc[/color][color=#007700]=new [/color][color=#0000bb]scanner[/color][color=#007700]([/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]in[/color][color=#007700]);[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].print([/color][color=#dd0000]"nhap so luong sv: "[/color][color=#007700]);[/color][color=#0000bb]int n1 [/color][color=#007700]= [/color][color=#0000bb]sc[/color][color=#007700].[/color][color=#0000bb]nextint[/color][color=#007700]();[/color][color=#ff8000]//tạo file lưu dữ liệu[/color][color=#007700]try{[/color][color=#0000bb]fileoutputstream nfile[/color][color=#007700]=new [/color][color=#0000bb]fileoutputstream[/color][color=#007700]([/color][color=#dd0000]"e:/file/ds.txt"[/color][color=#007700]);[/color][color=#0000bb]objectoutputstream nob[/color][color=#007700]=new [/color][color=#0000bb]objectoutputstream[/color][color=#007700]([/color][color=#0000bb]nfile[/color][color=#007700]);[/color][color=#0000bb]listsv1 a[/color][color=#007700];[/color][color=#0000bb]a[/color][color=#007700]=new [/color][color=#0000bb]listsv1[/color][color=#007700]([/color][color=#0000bb]n1[/color][color=#007700]);[/color][color=#0000bb]nob[/color][color=#007700].[/color][color=#0000bb]writeobject[/color][color=#007700]([/color][color=#0000bb]a[/color][color=#007700]);[/color][color=#0000bb]nfile[/color][color=#007700].[/color][color=#0000bb]close[/color][color=#007700]();[/color][color=#0000bb]nob[/color][color=#007700].[/color][color=#0000bb]close[/color][color=#007700]();}catch([/color][color=#0000bb]ioexception e1[/color][color=#007700]){[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].print([/color][color=#dd0000]"co loi xay ra"[/color][color=#007700]);}[/color][color=#ff8000]//a1= new listsv1(n1);//dọc file[/color][color=#007700]try{[/color][color=#0000bb]fileinputstream nfile[/color][color=#007700]=new [/color][color=#0000bb]fileinputstream[/color][color=#007700]([/color][color=#dd0000]"e:/file/ds.txt"[/color][color=#007700]);[/color][color=#0000bb]objectinputstream nin[/color][color=#007700]=new [/color][color=#0000bb]objectinputstream[/color][color=#007700]([/color][color=#0000bb]nfile[/color][color=#007700]);[/color][color=#0000bb]listsv1 a1[/color][color=#007700];[/color][color=#0000bb]a1 [/color][color=#007700]= ([/color][color=#0000bb]listsv1[/color][color=#007700]) [/color][color=#0000bb]nin[/color][color=#007700].[/color][color=#0000bb]readobject[/color][color=#007700]();[/color][color=#0000bb]a1[/color][color=#007700].[/color][color=#0000bb]dislay[/color][color=#007700]([/color][color=#0000bb]n1[/color][color=#007700]);[/color][color=#0000bb]nin[/color][color=#007700].[/color][color=#0000bb]close[/color][color=#007700]();[/color][color=#0000bb]nfile[/color][color=#007700].[/color][color=#0000bb]close[/color][color=#007700]();}catch([/color][color=#0000bb]ioexception e2[/color][color=#007700]){[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].print([/color][color=#dd0000]"co loi xay ra"[/color][color=#007700]);}[/color][color=#ff8000]//sinhvien[n1] s;[/color][color=#007700]for ([/color][color=#0000bb]int j[/color][color=#007700]=[/color][color=#0000bb]0[/color][color=#007700];[/color][color=#0000bb]j[/color][color=#007700]<[/color][color=#0000bb]n1[/color][color=#007700];[/color][color=#0000bb]j[/color][color=#007700]++){[/color][color=#ff8000]//a=a1[j];[/color][color=#007700]}}}[/color][color=#ff8000]//tạo class sinh viên:tên , mã thẻ, số sách nợ[/color][color=#007700]class [/color][color=#0000bb]sinhvien1 [/color][color=#007700]implements [/color][color=#0000bb]serializable[/color][color=#007700]{private [/color][color=#0000bb]string name[/color][color=#007700], [/color][color=#0000bb]mathe[/color][color=#007700];public [/color][color=#0000bb]string getname[/color][color=#007700]() {return [/color][color=#0000bb]name[/color][color=#007700];}public [/color][color=#0000bb]void setname[/color][color=#007700]([/color][color=#0000bb]string name[/color][color=#007700]) {[/color][color=#0000bb]this[/color][color=#007700].[/color][color=#0000bb]name [/color][color=#007700]= [/color][color=#0000bb]name[/color][color=#007700];}public [/color][color=#0000bb]string getmathe[/color][color=#007700]() {return [/color][color=#0000bb]mathe[/color][color=#007700];}public [/color][color=#0000bb]void setmathe[/color][color=#007700]([/color][color=#0000bb]string mathe[/color][color=#007700]) {[/color][color=#0000bb]this[/color][color=#007700].[/color][color=#0000bb]mathe [/color][color=#007700]= [/color][color=#0000bb]mathe[/color][color=#007700];}public [/color][color=#0000bb]int getnumberbook[/color][color=#007700]() {return [/color][color=#0000bb]numberbook[/color][color=#007700];}public [/color][color=#0000bb]void setnumberbook[/color][color=#007700]([/color][color=#0000bb]int numberbook[/color][color=#007700]) {[/color][color=#0000bb]this[/color][color=#007700].[/color][color=#0000bb]numberbook [/color][color=#007700]= [/color][color=#0000bb]numberbook[/color][color=#007700];}private [/color][color=#0000bb]int numberbook[/color][color=#007700];public [/color][color=#0000bb]void nhap[/color][color=#007700](){[/color][color=#0000bb]scanner sc[/color][color=#007700]=new [/color][color=#0000bb]scanner[/color][color=#007700]([/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]in[/color][color=#007700]);[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].print([/color][color=#dd0000]"nhap ho ten: "[/color][color=#007700]);[/color][color=#0000bb]name[/color][color=#007700]=[/color][color=#0000bb]sc[/color][color=#007700].[/color][color=#0000bb]nextline[/color][color=#007700]();[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].print([/color][color=#dd0000]"nhap ma the: "[/color][color=#007700]);[/color][color=#0000bb]mathe[/color][color=#007700]=[/color][color=#0000bb]sc[/color][color=#007700].[/color][color=#0000bb]nextline[/color][color=#007700]();[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].print([/color][color=#dd0000]"sach con no: "[/color][color=#007700]);[/color][color=#0000bb]numberbook[/color][color=#007700]=[/color][color=#0000bb]sc[/color][color=#007700].[/color][color=#0000bb]nextint[/color][color=#007700]();}}@[/color][color=#0000bb]suppresswarnings[/color][color=#007700]([/color][color=#dd0000]"serial"[/color][color=#007700])[/color][color=#ff8000]//tạo class lưu trữ danh sách sinh viên,một thuộc tính list của dữ liệu lớp sinhvien, phương thức nhập và hiển thị.[/color][color=#007700]class [/color][color=#0000bb]listsv1 [/color][color=#007700]implements [/color][color=#0000bb]serializable[/color][color=#007700]{[/color][color=#0000bb]sinhvien1[/color][color=#007700][] [/color][color=#0000bb]list1[/color][color=#007700];public [/color][color=#0000bb]listsv1[/color][color=#007700]([/color][color=#0000bb]int n[/color][color=#007700]){[/color][color=#0000bb]list1[/color][color=#007700]=new [/color][color=#0000bb]sinhvien1[/color][color=#007700][[/color][color=#0000bb]n[/color][color=#007700]];for([/color][color=#0000bb]int i[/color][color=#007700]=[/color][color=#0000bb]0[/color][color=#007700];[/color][color=#0000bb]i[/color][color=#007700]<[/color][color=#0000bb]n[/color][color=#007700];[/color][color=#0000bb]i[/color][color=#007700]++){[/color][color=#0000bb]list1[/color][color=#007700][[/color][color=#0000bb]i[/color][color=#007700]]=new [/color][color=#0000bb]sinhvien1[/color][color=#007700]();[/color][color=#0000bb]list1[/color][color=#007700][[/color][color=#0000bb]i[/color][color=#007700]].[/color][color=#0000bb]nhap[/color][color=#007700]();}}public [/color][color=#0000bb]void dislay[/color][color=#007700]([/color][color=#0000bb]int n[/color][color=#007700]){[/color][color=#0000bb]sinhvien1 ds[/color][color=#007700][];[/color][color=#0000bb]ds[/color][color=#007700]=new [/color][color=#0000bb]sinhvien1[/color][color=#007700][[/color][color=#0000bb]n[/color][color=#007700]];for ([/color][color=#0000bb]int j[/color][color=#007700]=[/color][color=#0000bb]0[/color][color=#007700];[/color][color=#0000bb]j[/color][color=#007700]<[/color][color=#0000bb]n[/color][color=#007700];[/color][color=#0000bb]j[/color][color=#007700]++){[/color][color=#0000bb]ds[/color][color=#007700][[/color][color=#0000bb]j[/color][color=#007700]]=[/color][color=#0000bb]list1[/color][color=#007700][[/color][color=#0000bb]j[/color][color=#007700]];[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"ho ten: "[/color][color=#007700]+[/color][color=#0000bb]ds[/color][color=#007700][[/color][color=#0000bb]j[/color][color=#007700]].[/color][color=#0000bb]getname[/color][color=#007700]());[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"ma the: "[/color][color=#007700]+[/color][color=#0000bb]ds[/color][color=#007700][[/color][color=#0000bb]j[/color][color=#007700]].[/color][color=#0000bb]getmathe[/color][color=#007700]());[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"no sach: "[/color][color=#007700]+[/color][color=#0000bb]ds[/color][color=#007700][[/color][color=#0000bb]j[/color][color=#007700]].[/color][color=#0000bb]getnumberbook[/color][color=#007700]());}}}[/color]
-
06-17-2014, 07:00 AM #12Junior Member
- Ngày tham gia
- Aug 2014
- Bài viết
- 0
<div class="bbcodeblock bbcodequote bbcmspoilerblock">
<div class="attribution type"><noscript>myunit32 (move your mouse to reveal the content)</noscript>
myunit32 (open)
myunit32 (close)
</div>
<div class="quotecontent">
<div class="bbcm_spoiler_noscript"><blockquote>
Mã nguồn PHP:[color=#000000]
package hoc[/color][color=#007700].[/color][color=#0000bb]java[/color][color=#007700]; [/color][color=#0000bb]import java[/color][color=#007700].[/color][color=#0000bb]io[/color][color=#007700].[/color][color=#0000bb]fileinputstream[/color][color=#007700];[/color][color=#0000bb]import java[/color][color=#007700].[/color][color=#0000bb]io[/color][color=#007700].[/color][color=#0000bb]fileoutputstream[/color][color=#007700];[/color][color=#0000bb]import java[/color][color=#007700].[/color][color=#0000bb]io[/color][color=#007700].[/color][color=#0000bb]ioexception[/color][color=#007700];[/color][color=#0000bb]import java[/color][color=#007700].[/color][color=#0000bb]io[/color][color=#007700].[/color][color=#0000bb]objectinputstream[/color][color=#007700];[/color][color=#0000bb]import java[/color][color=#007700].[/color][color=#0000bb]io[/color][color=#007700].[/color][color=#0000bb]objectoutputstream[/color][color=#007700];[/color][color=#0000bb]import java[/color][color=#007700].[/color][color=#0000bb]io[/color][color=#007700].[/color][color=#0000bb]serializable[/color][color=#007700];[/color][color=#0000bb]import java[/color][color=#007700].[/color][color=#0000bb]util[/color][color=#007700].[/color][color=#0000bb]scanner[/color][color=#007700]; public class [/color][color=#0000bb]unit33 [/color][color=#007700]{[/color][color=#0000bb]int soluong[/color][color=#007700]; public static [/color][color=#0000bb]void main[/color][color=#007700]([/color][color=#0000bb]string[/color][color=#007700][] [/color][color=#0000bb]args[/color][color=#007700]) {[/color][color=#0000bb]unit33 u [/color][color=#007700]= new [/color][color=#0000bb]unit33[/color][color=#007700]();[/color][color=#0000bb]u[/color][color=#007700].[/color][color=#0000bb]outputdata[/color][color=#007700]();[/color][color=#0000bb]u[/color][color=#007700].[/color][color=#0000bb]inputdata[/color][color=#007700]();} public [/color][color=#0000bb]void inputdata[/color][color=#007700]() {try {[/color][color=#0000bb]thethuvien[/color][color=#007700][] [/color][color=#0000bb]arrthe [/color][color=#007700]= new [/color][color=#0000bb]thethuvien[/color][color=#007700][[/color][color=#0000bb]10[/color][color=#007700]];[/color][color=#0000bb]fileinputstream file [/color][color=#007700]= new [/color][color=#0000bb]fileinputstream[/color][color=#007700]([/color][color=#dd0000]"c:\\java.dat"[/color][color=#007700]);[/color][color=#0000bb]objectinputstream oit [/color][color=#007700]= new [/color][color=#0000bb]objectinputstream[/color][color=#007700]([/color][color=#0000bb]file[/color][color=#007700]);for ([/color][color=#0000bb]int i [/color][color=#007700]= [/color][color=#0000bb]0[/color][color=#007700]; [/color][color=#0000bb]i [/color][color=#007700]< [/color][color=#0000bb]this[/color][color=#007700].[/color][color=#0000bb]soluong[/color][color=#007700]; [/color][color=#0000bb]i[/color][color=#007700]++) {[/color][color=#0000bb]arrthe[/color][color=#007700][[/color][color=#0000bb]i[/color][color=#007700]] = new [/color][color=#0000bb]thethuvien[/color][color=#007700]();[/color][color=#0000bb]arrthe[/color][color=#007700][[/color][color=#0000bb]i[/color][color=#007700]] = ([/color][color=#0000bb]thethuvien[/color][color=#007700]) [/color][color=#0000bb]oit[/color][color=#007700].[/color][color=#0000bb]readobject[/color][color=#007700]();}[/color][color=#0000bb]oit[/color][color=#007700].[/color][color=#0000bb]close[/color][color=#007700]();[/color][color=#0000bb]file[/color][color=#007700].[/color][color=#0000bb]close[/color][color=#007700]();for ([/color][color=#0000bb]int i [/color][color=#007700]= [/color][color=#0000bb]0[/color][color=#007700]; [/color][color=#0000bb]i [/color][color=#007700]< [/color][color=#0000bb]this[/color][color=#007700].[/color][color=#0000bb]soluong[/color][color=#007700]; [/color][color=#0000bb]i[/color][color=#007700]++) {[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].print([/color][color=#0000bb]arrthe[/color][color=#007700][[/color][color=#0000bb]i[/color][color=#007700]].[/color][color=#0000bb]getmathe[/color][color=#007700]() + [/color][color=#dd0000]" | "[/color][color=#007700]);[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].print([/color][color=#0000bb]arrthe[/color][color=#007700][[/color][color=#0000bb]i[/color][color=#007700]].[/color][color=#0000bb]gettensv[/color][color=#007700]() + [/color][color=#dd0000]" | "[/color][color=#007700]);[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].print([/color][color=#0000bb]arrthe[/color][color=#007700][[/color][color=#0000bb]i[/color][color=#007700]].[/color][color=#0000bb]getsoluongsachmuon[/color][color=#007700]() + [/color][color=#dd0000]" | "[/color][color=#007700]);[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]();} } catch ([/color][color=#0000bb]ioexception e[/color][color=#007700]) {[/color][color=#ff8000]// todo auto-generated catch block[/color][color=#0000bb]e[/color][color=#007700].[/color][color=#0000bb]printstacktrace[/color][color=#007700]();} catch ([/color][color=#0000bb]classnotfoundexception e[/color][color=#007700]) {[/color][color=#ff8000]// todo auto-generated catch block[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"khong tim thay class"[/color][color=#007700]);} } public [/color][color=#0000bb]void outputdata[/color][color=#007700]() {[/color][color=#0000bb]scanner in [/color][color=#007700]= new [/color][color=#0000bb]scanner[/color][color=#007700]([/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]in[/color][color=#007700]);try {[/color][color=#0000bb]fileoutputstream file [/color][color=#007700]= new [/color][color=#0000bb]fileoutputstream[/color][color=#007700]([/color][color=#dd0000]"c:\\java.dat"[/color][color=#007700]);[/color][color=#0000bb]objectoutputstream oot [/color][color=#007700]= new [/color][color=#0000bb]objectoutputstream[/color][color=#007700]([/color][color=#0000bb]file[/color][color=#007700]);[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"moi ban nhap so luong the thu vien: "[/color][color=#007700]);[/color][color=#0000bb]this[/color][color=#007700].[/color][color=#0000bb]soluong [/color][color=#007700]= [/color][color=#0000bb]in[/color][color=#007700].[/color][color=#0000bb]nextint[/color][color=#007700]();[/color][color=#0000bb]thethuvien[/color][color=#007700][] [/color][color=#0000bb]arrthe [/color][color=#007700]= new [/color][color=#0000bb]thethuvien[/color][color=#007700][[/color][color=#0000bb]soluong[/color][color=#007700]];for ([/color][color=#0000bb]int i [/color][color=#007700]= [/color][color=#0000bb]0[/color][color=#007700]; [/color][color=#0000bb]i [/color][color=#007700]< [/color][color=#0000bb]arrthe[/color][color=#007700].[/color][color=#0000bb]length[/color][color=#007700]; [/color][color=#0000bb]i[/color][color=#007700]++) {[/color][color=#0000bb]arrthe[/color][color=#007700][[/color][color=#0000bb]i[/color][color=#007700]] = new [/color][color=#0000bb]thethuvien[/color][color=#007700]();[/color][color=#0000bb]arrthe[/color][color=#007700][[/color][color=#0000bb]i[/color][color=#007700]].[/color][color=#0000bb]inputthethuvien[/color][color=#007700]();[/color][color=#0000bb]oot[/color][color=#007700].[/color][color=#0000bb]writeobject[/color][color=#007700]([/color][color=#0000bb]arrthe[/color][color=#007700][[/color][color=#0000bb]i[/color][color=#007700]]);}[/color][color=#0000bb]oot[/color][color=#007700].[/color][color=#0000bb]close[/color][color=#007700]();[/color][color=#0000bb]file[/color][color=#007700].[/color][color=#0000bb]close[/color][color=#007700]();} catch ([/color][color=#0000bb]ioexception e[/color][color=#007700]) {[/color][color=#ff8000]// todo auto-generated catch block[/color][color=#0000bb]e[/color][color=#007700].[/color][color=#0000bb]printstacktrace[/color][color=#007700]();}}} class [/color][color=#0000bb]thethuvien [/color][color=#007700]implements [/color][color=#0000bb]serializable [/color][color=#007700]{private [/color][color=#0000bb]string mathe[/color][color=#007700];private [/color][color=#0000bb]string tensv[/color][color=#007700];private [/color][color=#0000bb]int soluongsachmuon[/color][color=#007700]; public [/color][color=#0000bb]string getmathe[/color][color=#007700]() {return [/color][color=#0000bb]mathe[/color][color=#007700];} public [/color][color=#0000bb]void setmathe[/color][color=#007700]([/color][color=#0000bb]string mathe[/color][color=#007700]) {[/color][color=#0000bb]this[/color][color=#007700].[/color][color=#0000bb]mathe [/color][color=#007700]= [/color][color=#0000bb]mathe[/color][color=#007700];} public [/color][color=#0000bb]string gettensv[/color][color=#007700]() {return [/color][color=#0000bb]tensv[/color][color=#007700];} public [/color][color=#0000bb]void settensv[/color][color=#007700]([/color][color=#0000bb]string tensv[/color][color=#007700]) {[/color][color=#0000bb]this[/color][color=#007700].[/color][color=#0000bb]tensv [/color][color=#007700]= [/color][color=#0000bb]tensv[/color][color=#007700];} public [/color][color=#0000bb]int getsoluongsachmuon[/color][color=#007700]() {return [/color][color=#0000bb]soluongsachmuon[/color][color=#007700];} public [/color][color=#0000bb]void setsoluongsachmuon[/color][color=#007700]([/color][color=#0000bb]int soluongsachmuon[/color][color=#007700]) {[/color][color=#0000bb]this[/color][color=#007700].[/color][color=#0000bb]soluongsachmuon [/color][color=#007700]= [/color][color=#0000bb]soluongsachmuon[/color][color=#007700];} public [/color][color=#0000bb]void inputthethuvien[/color][color=#007700]() {[/color][color=#0000bb]scanner in [/color][color=#007700]= new [/color][color=#0000bb]scanner[/color][color=#007700]([/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]in[/color][color=#007700]);[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"nhap ma the: "[/color][color=#007700]);[/color][color=#0000bb]this[/color][color=#007700].[/color][color=#0000bb]mathe [/color][color=#007700]= [/color][color=#0000bb]in[/color][color=#007700].[/color][color=#0000bb]nextline[/color][color=#007700]();[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"nhap ten sinh vien: "[/color][color=#007700]);[/color][color=#0000bb]this[/color][color=#007700].[/color][color=#0000bb]tensv [/color][color=#007700]= [/color][color=#0000bb]in[/color][color=#007700].[/color][color=#0000bb]nextline[/color][color=#007700]();[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"nhap so luong sach muon: "[/color][color=#007700]);[/color][color=#0000bb]this[/color][color=#007700].[/color][color=#0000bb]soluongsachmuon [/color][color=#007700]= [/color][color=#0000bb]in[/color][color=#007700].[/color][color=#0000bb]nextint[/color][color=#007700]();}}[/color]
</div>
</div>
-
07-14-2014, 07:00 AM #13Banned
- Ngày tham gia
- Dec 2014
- Bài viết
- 0
Gửi bởi dienlh93
-
08-01-2014, 07:00 AM #14Junior Member
- Ngày tham gia
- Mar 2015
- Đang ở
- 315 - Trường Chinh - Thanh Xuân - Hà Nội
- Bài viết
- 0
Mã nguồn PHP:[color=#000000]
package baitap[/color][color=#007700];[/color][color=#0000bb]import java[/color][color=#007700].[/color][color=#0000bb]io[/color][color=#007700].*;[/color][color=#0000bb]import java[/color][color=#007700].[/color][color=#0000bb]io[/color][color=#007700].[/color][color=#0000bb]serializable[/color][color=#007700];[/color][color=#0000bb]import java[/color][color=#007700].[/color][color=#0000bb]util[/color][color=#007700].[/color][color=#0000bb]scanner[/color][color=#007700];class [/color][color=#0000bb]thethuvien [/color][color=#007700]implements [/color][color=#0000bb]serializable[/color][color=#007700]{public [/color][color=#0000bb]string tensv[/color][color=#007700];public [/color][color=#0000bb]int mathe[/color][color=#007700],[/color][color=#0000bb]sosachmuon[/color][color=#007700];public [/color][color=#0000bb]int getmathe[/color][color=#007700]() {return [/color][color=#0000bb]mathe[/color][color=#007700];}public [/color][color=#0000bb]int getsosachmuon[/color][color=#007700]() {return [/color][color=#0000bb]sosachmuon[/color][color=#007700];}public [/color][color=#0000bb]string gettensv[/color][color=#007700]() {return [/color][color=#0000bb]tensv[/color][color=#007700];}public [/color][color=#0000bb]void setmathe[/color][color=#007700]([/color][color=#0000bb]int mathe[/color][color=#007700]) {[/color][color=#0000bb]this[/color][color=#007700].[/color][color=#0000bb]mathe [/color][color=#007700]= [/color][color=#0000bb]mathe[/color][color=#007700];}public [/color][color=#0000bb]void setsosachmuon[/color][color=#007700]([/color][color=#0000bb]int sosachmuon[/color][color=#007700]) {[/color][color=#0000bb]this[/color][color=#007700].[/color][color=#0000bb]sosachmuon [/color][color=#007700]= [/color][color=#0000bb]sosachmuon[/color][color=#007700];}public [/color][color=#0000bb]void settensv[/color][color=#007700]([/color][color=#0000bb]string tensv[/color][color=#007700]) {[/color][color=#0000bb]this[/color][color=#007700].[/color][color=#0000bb]tensv [/color][color=#007700]= [/color][color=#0000bb]tensv[/color][color=#007700];}}public class [/color][color=#0000bb]unit33 [/color][color=#007700]{public static [/color][color=#0000bb]void main[/color][color=#007700]([/color][color=#0000bb]string[/color][color=#007700][] [/color][color=#0000bb]args[/color][color=#007700]) [/color][color=#0000bb]throws ioexception [/color][color=#007700]{[/color][color=#0000bb]scanner innum[/color][color=#007700]=new [/color][color=#0000bb]scanner[/color][color=#007700]([/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]in[/color][color=#007700]);[/color][color=#0000bb]scanner intext[/color][color=#007700]=new [/color][color=#0000bb]scanner[/color][color=#007700]([/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]in[/color][color=#007700]);[/color][color=#0000bb]thethuvien a[/color][color=#007700]=new [/color][color=#0000bb]thethuvien[/color][color=#007700]();[/color][color=#0000bb]thethuvien b[/color][color=#007700]=new [/color][color=#0000bb]thethuvien[/color][color=#007700]();[/color][color=#0000bb]thethuvien c[/color][color=#007700]=new [/color][color=#0000bb]thethuvien[/color][color=#007700]();[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"nhap thong tin sv a"[/color][color=#007700]);[/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]tensv[/color][color=#007700]=[/color][color=#0000bb]intext[/color][color=#007700].[/color][color=#0000bb]nextline[/color][color=#007700]();[/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]mathe[/color][color=#007700]=[/color][color=#0000bb]innum[/color][color=#007700].[/color][color=#0000bb]nextint[/color][color=#007700]();[/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]sosachmuon[/color][color=#007700]=[/color][color=#0000bb]innum[/color][color=#007700].[/color][color=#0000bb]nextint[/color][color=#007700]();[/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]setmathe[/color][color=#007700]([/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]mathe[/color][color=#007700]);[/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]settensv[/color][color=#007700]([/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]tensv[/color][color=#007700]);[/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]setsosachmuon[/color][color=#007700]([/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]sosachmuon[/color][color=#007700]);[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"nhap thong tin sv b"[/color][color=#007700]);[/color][color=#0000bb]b[/color][color=#007700].[/color][color=#0000bb]tensv[/color][color=#007700]=[/color][color=#0000bb]intext[/color][color=#007700].[/color][color=#0000bb]nextline[/color][color=#007700]();[/color][color=#0000bb]b[/color][color=#007700].[/color][color=#0000bb]mathe[/color][color=#007700]=[/color][color=#0000bb]innum[/color][color=#007700].[/color][color=#0000bb]nextint[/color][color=#007700]();[/color][color=#0000bb]b[/color][color=#007700].[/color][color=#0000bb]sosachmuon[/color][color=#007700]=[/color][color=#0000bb]innum[/color][color=#007700].[/color][color=#0000bb]nextint[/color][color=#007700]();[/color][color=#0000bb]b[/color][color=#007700].[/color][color=#0000bb]setmathe[/color][color=#007700]([/color][color=#0000bb]b[/color][color=#007700].[/color][color=#0000bb]mathe[/color][color=#007700]);[/color][color=#0000bb]b[/color][color=#007700].[/color][color=#0000bb]settensv[/color][color=#007700]([/color][color=#0000bb]b[/color][color=#007700].[/color][color=#0000bb]tensv[/color][color=#007700]);[/color][color=#0000bb]b[/color][color=#007700].[/color][color=#0000bb]setsosachmuon[/color][color=#007700]([/color][color=#0000bb]b[/color][color=#007700].[/color][color=#0000bb]sosachmuon[/color][color=#007700]);[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"nhap thong tin sv c"[/color][color=#007700]);[/color][color=#0000bb]c[/color][color=#007700].[/color][color=#0000bb]tensv[/color][color=#007700]=[/color][color=#0000bb]intext[/color][color=#007700].[/color][color=#0000bb]nextline[/color][color=#007700]();[/color][color=#0000bb]c[/color][color=#007700].[/color][color=#0000bb]mathe[/color][color=#007700]=[/color][color=#0000bb]innum[/color][color=#007700].[/color][color=#0000bb]nextint[/color][color=#007700]();[/color][color=#0000bb]c[/color][color=#007700].[/color][color=#0000bb]sosachmuon[/color][color=#007700]=[/color][color=#0000bb]innum[/color][color=#007700].[/color][color=#0000bb]nextint[/color][color=#007700]();[/color][color=#0000bb]c[/color][color=#007700].[/color][color=#0000bb]setmathe[/color][color=#007700]([/color][color=#0000bb]c[/color][color=#007700].[/color][color=#0000bb]mathe[/color][color=#007700]);[/color][color=#0000bb]c[/color][color=#007700].[/color][color=#0000bb]settensv[/color][color=#007700]([/color][color=#0000bb]c[/color][color=#007700].[/color][color=#0000bb]tensv[/color][color=#007700]);[/color][color=#0000bb]c[/color][color=#007700].[/color][color=#0000bb]setsosachmuon[/color][color=#007700]([/color][color=#0000bb]c[/color][color=#007700].[/color][color=#0000bb]sosachmuon[/color][color=#007700]);try {[/color][color=#0000bb]fileoutputstream f [/color][color=#007700]= new [/color][color=#0000bb]fileoutputstream[/color][color=#007700]([/color][color=#dd0000]"d:\\sinhvien.txt"[/color][color=#007700]);[/color][color=#0000bb]objectoutputstream oot[/color][color=#007700]= new [/color][color=#0000bb]objectoutputstream[/color][color=#007700]([/color][color=#0000bb]f[/color][color=#007700]);[/color][color=#0000bb]oot[/color][color=#007700].[/color][color=#0000bb]writeobject[/color][color=#007700]([/color][color=#0000bb]a[/color][color=#007700]);[/color][color=#0000bb]oot[/color][color=#007700].[/color][color=#0000bb]writeobject[/color][color=#007700]([/color][color=#0000bb]b[/color][color=#007700]);[/color][color=#0000bb]oot[/color][color=#007700].[/color][color=#0000bb]writeobject[/color][color=#007700]([/color][color=#0000bb]c[/color][color=#007700]);[/color][color=#0000bb]oot[/color][color=#007700].[/color][color=#0000bb]close[/color][color=#007700]();[/color][color=#0000bb]f[/color][color=#007700].[/color][color=#0000bb]close[/color][color=#007700]();} catch ([/color][color=#0000bb]ioexception e[/color][color=#007700]) {[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"xay ra loi 1: "[/color][color=#007700]+[/color][color=#0000bb]e[/color][color=#007700]);}[/color][color=#0000bb]thethuvien a1 [/color][color=#007700]= new [/color][color=#0000bb]thethuvien[/color][color=#007700]();[/color][color=#0000bb]thethuvien b1 [/color][color=#007700]= new [/color][color=#0000bb]thethuvien[/color][color=#007700]();[/color][color=#0000bb]thethuvien c1 [/color][color=#007700]= new [/color][color=#0000bb]thethuvien[/color][color=#007700]();try {[/color][color=#0000bb]fileinputstream f [/color][color=#007700]= new [/color][color=#0000bb]fileinputstream[/color][color=#007700]([/color][color=#dd0000]"d:\\sinhvien.txt"[/color][color=#007700]);[/color][color=#0000bb]objectinputstream oit [/color][color=#007700]= new [/color][color=#0000bb]objectinputstream[/color][color=#007700]([/color][color=#0000bb]f[/color][color=#007700]);[/color][color=#0000bb]a1[/color][color=#007700]= ([/color][color=#0000bb]thethuvien[/color][color=#007700]) [/color][color=#0000bb]oit[/color][color=#007700].[/color][color=#0000bb]readobject[/color][color=#007700]();[/color][color=#0000bb]b1[/color][color=#007700]= ([/color][color=#0000bb]thethuvien[/color][color=#007700]) [/color][color=#0000bb]oit[/color][color=#007700].[/color][color=#0000bb]readobject[/color][color=#007700]();[/color][color=#0000bb]c1[/color][color=#007700]= ([/color][color=#0000bb]thethuvien[/color][color=#007700]) [/color][color=#0000bb]oit[/color][color=#007700].[/color][color=#0000bb]readobject[/color][color=#007700]();[/color][color=#0000bb]oit[/color][color=#007700].[/color][color=#0000bb]close[/color][color=#007700]();[/color][color=#0000bb]f[/color][color=#007700].[/color][color=#0000bb]close[/color][color=#007700]();} catch ([/color][color=#0000bb]ioexception e[/color][color=#007700]) {[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"xay ra loi 2: "[/color][color=#007700]+[/color][color=#0000bb]e[/color][color=#007700]);}catch([/color][color=#0000bb]classnotfoundexception e[/color][color=#007700]){[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"khong tim thay class"[/color][color=#007700]);}[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"thong tin the thu vien sv a1 doc ra la:
ten: "[/color][color=#007700]+[/color][color=#0000bb]a1[/color][color=#007700].[/color][color=#0000bb]tensv[/color][color=#007700]+[/color][color=#dd0000]"
ma the: "[/color][color=#007700]+[/color][color=#0000bb]a1[/color][color=#007700].[/color][color=#0000bb]mathe[/color][color=#007700]+[/color][color=#dd0000]"
so sach muon: "[/color][color=#007700]+[/color][color=#0000bb]a1[/color][color=#007700].[/color][color=#0000bb]sosachmuon[/color][color=#007700]+[/color][color=#dd0000]"
"[/color][color=#007700]);[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"thong tin the thu vien sv b1 doc ra la:
ten: "[/color][color=#007700]+[/color][color=#0000bb]b1[/color][color=#007700].[/color][color=#0000bb]tensv[/color][color=#007700]+[/color][color=#dd0000]"
ma the: "[/color][color=#007700]+[/color][color=#0000bb]b1[/color][color=#007700].[/color][color=#0000bb]mathe[/color][color=#007700]+[/color][color=#dd0000]"
so sach muon: "[/color][color=#007700]+[/color][color=#0000bb]b1[/color][color=#007700].[/color][color=#0000bb]sosachmuon[/color][color=#007700]+[/color][color=#dd0000]"
"[/color][color=#007700]);[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"thong tin the thu vien sv c1 doc ra la:
ten: "[/color][color=#007700]+[/color][color=#0000bb]c1[/color][color=#007700].[/color][color=#0000bb]tensv[/color][color=#007700]+[/color][color=#dd0000]"
ma the: "[/color][color=#007700]+[/color][color=#0000bb]c1[/color][color=#007700].[/color][color=#0000bb]mathe[/color][color=#007700]+[/color][color=#dd0000]"
so sach muon: "[/color][color=#007700]+[/color][color=#0000bb]c1[/color][color=#007700].[/color][color=#0000bb]sosachmuon[/color][color=#007700]);}}[/color]
-
09-15-2014, 07:00 AM #15Junior Member
- Ngày tham gia
- May 2015
- Bài viết
- 0
Gửi bởi haihack
-
09-20-2014, 07:00 AM #16Junior Member
- Ngày tham gia
- Feb 2015
- Bài viết
- 0
<div class="bbcodeblock bbcodequote bbcmspoilerblock">
<div class="attribution type"><noscript>btvn - bai33 (move your mouse to reveal the content)</noscript>
btvn - bai33 (open)
btvn - bai33 (close)
</div>
<div class="quotecontent">
<div class="bbcm_spoiler_noscript"><blockquote>
Mã nguồn PHP:[color=#000000]
package baitapvenha[/color][color=#007700];[/color][color=#0000bb]import java[/color][color=#007700].[/color][color=#0000bb]io[/color][color=#007700].[/color][color=#0000bb]fileinputstream[/color][color=#007700];[/color][color=#0000bb]import java[/color][color=#007700].[/color][color=#0000bb]io[/color][color=#007700].[/color][color=#0000bb]filenotfoundexception[/color][color=#007700];[/color][color=#0000bb]import java[/color][color=#007700].[/color][color=#0000bb]io[/color][color=#007700].[/color][color=#0000bb]fileoutputstream[/color][color=#007700];[/color][color=#0000bb]import java[/color][color=#007700].[/color][color=#0000bb]io[/color][color=#007700].[/color][color=#0000bb]ioexception[/color][color=#007700];[/color][color=#0000bb]import java[/color][color=#007700].[/color][color=#0000bb]io[/color][color=#007700].[/color][color=#0000bb]objectinputstream[/color][color=#007700];[/color][color=#0000bb]import java[/color][color=#007700].[/color][color=#0000bb]io[/color][color=#007700].[/color][color=#0000bb]objectoutputstream[/color][color=#007700];[/color][color=#0000bb]import java[/color][color=#007700].[/color][color=#0000bb]io[/color][color=#007700].[/color][color=#0000bb]serializable[/color][color=#007700];[/color][color=#0000bb]import java[/color][color=#007700].[/color][color=#0000bb]util[/color][color=#007700].[/color][color=#0000bb]scanner[/color][color=#007700];[/color][color=#ff8000]/*** class thẻ thư viện có các thuộc tính: mã thẻ, tên sinh viên, số sách mượn.* tạo ra 3 đối tượng thẻ thư viện, gán giá trị nhập vào từ bàn phím. ghi lại* thông tin 3 đối tượng này xuống file theo kiểu object rồi đọc file đó, đọc dữ* liệu các đối tượng từ trong file vừa ghi, in ra màn hình!*/[/color][color=#007700]public class [/color][color=#0000bb]bai33_rwobject [/color][color=#007700]{ public static [/color][color=#0000bb]void main[/color][color=#007700]([/color][color=#0000bb]string[/color][color=#007700][] [/color][color=#0000bb]args[/color][color=#007700]){ [/color][color=#0000bb]thetv the1 [/color][color=#007700]= new [/color][color=#0000bb]thetv[/color][color=#007700](); [/color][color=#0000bb]thetv the2 [/color][color=#007700]= new [/color][color=#0000bb]thetv[/color][color=#007700](); [/color][color=#0000bb]thetv the3 [/color][color=#007700]= new [/color][color=#0000bb]thetv[/color][color=#007700](); [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"
nhap the1: "[/color][color=#007700]); [/color][color=#0000bb]the1[/color][color=#007700].[/color][color=#0000bb]nhaptt[/color][color=#007700](); [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"
nhap the2: "[/color][color=#007700]); [/color][color=#0000bb]the2[/color][color=#007700].[/color][color=#0000bb]nhaptt[/color][color=#007700](); [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"
nhap the3: "[/color][color=#007700]); [/color][color=#0000bb]the3[/color][color=#007700].[/color][color=#0000bb]nhaptt[/color][color=#007700](); try { [/color][color=#0000bb]fileoutputstream fo [/color][color=#007700]= new [/color][color=#0000bb]fileoutputstream[/color][color=#007700]([/color][color=#dd0000]"e:\\demofile\\thuvien.dat"[/color][color=#007700]); [/color][color=#0000bb]objectoutputstream oot [/color][color=#007700]= new [/color][color=#0000bb]objectoutputstream[/color][color=#007700]([/color][color=#0000bb]fo[/color][color=#007700]); [/color][color=#0000bb]oot[/color][color=#007700].[/color][color=#0000bb]writeobject[/color][color=#007700]([/color][color=#0000bb]the1[/color][color=#007700]); [/color][color=#0000bb]oot[/color][color=#007700].[/color][color=#0000bb]writeobject[/color][color=#007700]([/color][color=#0000bb]the2[/color][color=#007700]); [/color][color=#0000bb]oot[/color][color=#007700].[/color][color=#0000bb]writeobject[/color][color=#007700]([/color][color=#0000bb]the3[/color][color=#007700]); [/color][color=#0000bb]fo[/color][color=#007700].[/color][color=#0000bb]close[/color][color=#007700](); [/color][color=#0000bb]oot[/color][color=#007700].[/color][color=#0000bb]close[/color][color=#007700](); } catch ([/color][color=#0000bb]filenotfoundexception e[/color][color=#007700]) { [/color][color=#ff8000]// todo: handle exception [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"error "[/color][color=#007700]+[/color][color=#0000bb]e[/color][color=#007700]); } catch ([/color][color=#0000bb]ioexception e[/color][color=#007700]) { [/color][color=#ff8000]// todo auto-generated catch block [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"error "[/color][color=#007700]+[/color][color=#0000bb]e[/color][color=#007700]); } try { [/color][color=#0000bb]fileinputstream fi [/color][color=#007700]= new [/color][color=#0000bb]fileinputstream[/color][color=#007700]([/color][color=#dd0000]"e:\\demofile\\thuvien.dat"[/color][color=#007700]); [/color][color=#0000bb]objectinputstream oit [/color][color=#007700]= new [/color][color=#0000bb]objectinputstream[/color][color=#007700]([/color][color=#0000bb]fi[/color][color=#007700]); [/color][color=#0000bb]the1 [/color][color=#007700]= ([/color][color=#0000bb]thetv[/color][color=#007700]) [/color][color=#0000bb]oit[/color][color=#007700].[/color][color=#0000bb]readobject[/color][color=#007700](); [/color][color=#0000bb]the2 [/color][color=#007700]= ([/color][color=#0000bb]thetv[/color][color=#007700]) [/color][color=#0000bb]oit[/color][color=#007700].[/color][color=#0000bb]readobject[/color][color=#007700](); [/color][color=#0000bb]the3 [/color][color=#007700]= ([/color][color=#0000bb]thetv[/color][color=#007700]) [/color][color=#0000bb]oit[/color][color=#007700].[/color][color=#0000bb]readobject[/color][color=#007700](); [/color][color=#0000bb]fi[/color][color=#007700].[/color][color=#0000bb]close[/color][color=#007700](); [/color][color=#0000bb]oit[/color][color=#007700].[/color][color=#0000bb]close[/color][color=#007700](); } catch ([/color][color=#0000bb]ioexception e[/color][color=#007700]) { [/color][color=#ff8000]// todo: handle exception [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"error: "[/color][color=#007700]+[/color][color=#0000bb]e[/color][color=#007700]); } catch ([/color][color=#0000bb]classnotfoundexception e[/color][color=#007700]) { [/color][color=#ff8000]// todo: handle exception [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"error: "[/color][color=#007700]+[/color][color=#0000bb]e[/color][color=#007700]); } [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"thong tin the thu vien:"[/color][color=#007700]); [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"\tmathe\tten\tsosachmuon"[/color][color=#007700]); [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"\t"[/color][color=#007700]+[/color][color=#0000bb]the1[/color][color=#007700].[/color][color=#0000bb]getmathe[/color][color=#007700]()+[/color][color=#dd0000]"\t"[/color][color=#007700]+[/color][color=#0000bb]the1[/color][color=#007700].[/color][color=#0000bb]gettensv[/color][color=#007700]()+[/color][color=#dd0000]"\t"[/color][color=#007700]+[/color][color=#0000bb]the1[/color][color=#007700].[/color][color=#0000bb]getsosachmuon[/color][color=#007700]()); [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"\t"[/color][color=#007700]+[/color][color=#0000bb]the2[/color][color=#007700].[/color][color=#0000bb]getmathe[/color][color=#007700]()+[/color][color=#dd0000]"\t"[/color][color=#007700]+[/color][color=#0000bb]the2[/color][color=#007700].[/color][color=#0000bb]gettensv[/color][color=#007700]()+[/color][color=#dd0000]"\t"[/color][color=#007700]+[/color][color=#0000bb]the2[/color][color=#007700].[/color][color=#0000bb]getsosachmuon[/color][color=#007700]()); [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"\t"[/color][color=#007700]+[/color][color=#0000bb]the3[/color][color=#007700].[/color][color=#0000bb]getmathe[/color][color=#007700]()+[/color][color=#dd0000]"\t"[/color][color=#007700]+[/color][color=#0000bb]the3[/color][color=#007700].[/color][color=#0000bb]gettensv[/color][color=#007700]()+[/color][color=#dd0000]"\t"[/color][color=#007700]+[/color][color=#0000bb]the3[/color][color=#007700].[/color][color=#0000bb]getsosachmuon[/color][color=#007700]()); } } class [/color][color=#0000bb]thetv [/color][color=#007700]implements [/color][color=#0000bb]serializable[/color][color=#007700]{ private [/color][color=#0000bb]string mathe[/color][color=#007700], [/color][color=#0000bb]tensv[/color][color=#007700]; private [/color][color=#0000bb]int sosachmuon[/color][color=#007700]; public [/color][color=#0000bb]void nhaptt[/color][color=#007700]() { [/color][color=#0000bb]scanner sc [/color][color=#007700]= new [/color][color=#0000bb]scanner[/color][color=#007700]([/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]in[/color][color=#007700]); [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].print([/color][color=#dd0000]"ma the : "[/color][color=#007700]); [/color][color=#0000bb]mathe [/color][color=#007700]= [/color][color=#0000bb]sc[/color][color=#007700].[/color][color=#0000bb]nextline[/color][color=#007700](); [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].print([/color][color=#dd0000]"ten sv : "[/color][color=#007700]); [/color][color=#0000bb]tensv [/color][color=#007700]= [/color][color=#0000bb]sc[/color][color=#007700].[/color][color=#0000bb]nextline[/color][color=#007700](); [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].print([/color][color=#dd0000]"so sach muon : "[/color][color=#007700]); try { [/color][color=#0000bb]sosachmuon [/color][color=#007700]= [/color][color=#0000bb]integer[/color][color=#007700].[/color][color=#0000bb]parseint[/color][color=#007700]([/color][color=#0000bb]sc[/color][color=#007700].[/color][color=#0000bb]nextline[/color][color=#007700]()); } catch ([/color][color=#0000bb]exception e[/color][color=#007700]) { [/color][color=#ff8000]// todo: handle exception [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"error: "[/color][color=#007700]+[/color][color=#0000bb]e[/color][color=#007700]); } } public [/color][color=#0000bb]string getmathe[/color][color=#007700]() { return [/color][color=#0000bb]mathe[/color][color=#007700]; } public [/color][color=#0000bb]string gettensv[/color][color=#007700]() { return [/color][color=#0000bb]tensv[/color][color=#007700]; } public [/color][color=#0000bb]int getsosachmuon[/color][color=#007700]() { return [/color][color=#0000bb]sosachmuon[/color][color=#007700]; } }[/color]
</div>
</div>
Khu chung cư cao cấp Bcons Garden Bình Dương được xây dựng bởi Cty Cổ phần Đầu tư Xây dựng Bcons ấm cúng thoải mái nhiều chính sách khu đất trung tâm. Bcons Garden Bình Dương giagocchudautu.com ấm...
Khu đô thị Bcons Garden Bình Dương tiện nghi đích thực