全民快乐8

你当前所在位置:全民快乐8 > IT就业问题 > 划重点了:Java面试基础知识有哪些?

划重点了:Java面试基础知识有哪些?

1.面向对象的三大特性

JICHENG、FENGZHUANG、DUOTAI


什么是继承?

全民快乐8①JICHENGSHIMIANXIANGDUIXIANGCHENGXUSHEJINENGGOUTIGAORUANJIANKAIFAXIAOLVDEZHONGYAOYUANYINZHIYI。

全民快乐8②JICHENGSHIJUYOUCHUANDIXINGDE,JIUXIANGXIANSHIZHONGSUNZIBUJINZHANGDEXIANGBABAERQIEHAIXIANGTAYEYE。

全民快乐8③JICHENGLAIDESHUXINGHEFANGFASHIYINSHIDE,YEJIUSHIZAIBENLEILIMIANSHIKANBUJIANDE。

全民快乐8④YIGELEIZHINENGYOUYIGEFULEI,YEJIUSHILEIZHINENGSHIDANJICHENG。

全民快乐8⑤YIGEJIEKOUKEYIYOUDUOGEFULEI,YEJIUSHIJIEKOUKEYISHIDUOJICHENG。

全民快乐8SHIJIXIANGMUKAIFAZHONG,YIGELEIJICHENGYULINGYIGELEI,NEIMEQIANZHEJIUSHIHOUZHEDEZILEI,FANZEFANZHI。

微信截图_20191101110606.png


什么是封装?

全民快乐8DUIXIANGSHUJUHECAOZUOGAIDUIXIANGDEZHILINGDOUSHIDUIXIANGZISHENDEYIBUFEN,NENGGOUSHIXIANJINKENENGDUIWAIBUYINZANGSHUJU。

全民快乐8SHIJIXIANGMUKAIFAZHONG,SHIYONGFENGZHUANGZUIDUODEJIUSHISHITILEI,CHANGCHANGHE JavaBean (LEIBIXUSHIJUTIDEHEGONGGONGDE,BINGQIEJUYOUWUCANSHUDEGOUZAOQI)YIQISHIYONG。

NEIME,SHITILEIYOUNEIXIEDONGXINI

DA:SIYOUDECHENGYUANBIANLIANG、WUCANSHUDEGOUZAOQI、YOUCANSHUDEGOUZAOQI、setterHEgettersFANGFA、ZHONGXIEtostringFANGFA、ZHONGXIEhashCodeHEequalsFANGFA。


什么是多态?

全民快乐8①DUOTAIJIUSHIDUIXIANGYONGYOUDUOZHONGXINGTAI:YINYONGDUOTAIHEFANGFADUOTAI。

②YINYONGDUOTAI:FULEIDEYINYONGKEYIZHIXIANGBENLEIDUIXIANG、FULEIDEYINYONGKEYIZHIXIANGZILEIDEDUIXIANG。

全民快乐8③FANGFADUOTAI:CHUANGJIANBENLEIDUIXIANGSHI,DIAOYONGDEFANGFAWEIBENLEIDEFANGFA;CHUANGJIANZILEIDUIXIANGSHI,DIAOYONGDEFANGFAWEIZILEIZHONGXIEDEFANGFAHUOZHEJICHENGDEFANGFA。

全民快乐8④CUNZAIDUOTAIDEBIYAOTIAOJIAN:JICHENG、ZHONGXIE。

全民快乐8⑤DUOTAIDEZUOYONGSHIXIAOCHULEIXINGZHIJIANDEOUHEGUANXI。

ZAISHIJIXIANGMUKAIFAZHONG,A LEIJICHENG B LEI,RUGUOZAI A LEIZHONGBUZHONGXIE B LEIDEFANGFADESHIHOU,SHUCHUDERENGJIUSHI B LEIFANGFALIMIANDEXINXI(B b=new A());RUGUOZAIALEIZHONGZHONGXIE B LEIDEFANGFADESHIHOU,SHUCHUDESHI A LEIFANGFALIMIANDEXINXI(B b=new A())。


2.Java集合框架树

Collection JIEKOU:TASHI Java JIHEKUANGJIADEYIGEGENJIEKOU,YESHIList、SetHE Queue JIEKOUDEFUJIEKOU。TONGSHITADINGYILEKEYONGYUCAOZUO List、Set HE Queue DEFANGFA—ZENGSHANGAICHA。


MapJIEKOU:TATIGONGLEYIZHONGYINGSHEGUANXI,QIZHONGDEYUANSUSHIYIJIANZHIDUI (key-value) DEXINGSHICUNCHUDE。Map JIEKOUYOUYIGEZHONGYAODESHIXIANLEI HashMap。

①ZAI Map JIEKOUZHONGDEJIANZHIDUISHIYI Entry LEIXINGDEDUIXIANGSHILIXINGSHICUNZAI。

全民快乐8②ZAI Map JIEKOUZHONGJIANZHI( Key ZHI)SHIBUKEYIZHONGFUDE,value ZHIQUEKEYIZHONGFU,YEJIUSHICUNZAIDUODUIYIDEGUANXI。

全民快乐8③ZAI Map JIEKOUZHONGTIGONGLEFENBIEFANHUIKeyZHIDEJIHE、valueZHIDEJIHEYIJIEntryJIHEDEFANGFA。

全民快乐8④ Map ZHICHIFANXING,TONGSHI Key ZHIHE value ZHIDOUSHIKEYIWEI null DE。

⑤ZAI HashMap ZHONGDE Entry DUIXIANGSHIWUXUPAIXUDE,ZHEIDIANTEXINGHE List JIEKOUSHIXIANGFANDE。

⑥ZAI HashMap ZHONGYOUQIEZHINENGYOUYIGE Key ZHIWEI null DEYINGSHE。(ZHU:ke ZHISHIBUNENGZHONGFUDE)


List JIEKOU:List JIEKOUYOUYIGEZHONGYAODESHIXIANLEI ArrayList (SHUZUXULIE)。

全民快乐8① List SHIYUANSUYOUXUBINGQIEKEYIZHONGFUDEJIHE。

② List KEYIJINGQUEDEKONGZHIMEIGEYUANSUDECHARUWEIZHI,HUOSHANCHUMOUGEYUANSUDEWEIZHI。


ComparatorJIEKOU:LINSHIDEBIJIAOGUIZE。RUGUOMOUYIGELEIYAOSHIXIANZHEIGEJIEKOU,NEIBIRANYAOSHIXIANTADE Compare() FANGFA。

全民快乐8ComparableJIEKOU:MORENDEBIJIAOGUIZE。DANGSHIXIANLEZHEIGEJIEKOU,ZEBIAOSHIZHEIGELEIDESHILIKEYIBIJIAODAXIAO,KEYIJINXINGZIRANPAIXU。RUGUOMOUYIGELEIYAOSHIXIANZHEIGEJIEKOU,NEIBIRANYAOSHIXIANTADE CompareTo() FANGFA。


3.Java中的IO流

ZIJIELIU:

//YIGEZIJIEYIGEZIJIEDEDUXIE

全民快乐8FileInputStream in=new FileInputStream("YUANWENJIAN");

FileOutputStream out=new FileOutputStream("MUBIAOWENJIAN");

......

in.close();

out.close();


全民快乐8SHOUXIANYAOJIZHU,YIDANSHIYONGLEIOLIUZUIHOUYIDINGYAOJIDEGUANBI,ZHEISHICHANGSHI。

//LIYONGHUANCHONGQU,GAOXIAODEDUQUZIJIE

全民快乐8BufferedInputStream in=new BufferedInputStream(new FileInputStream("YUANWENJIAN");

BufferedOutputStream out=new BufferedOutputStream(new FileOutputStream("MUBIAOWENJIAN");

......

in.close();

全民快乐8out.close();


ZIFULIU:

InputStreamReader isr=new InputStreamReader(new FileInputStream("YUANWENJIANLUJING"),"SHEZHIBIANMA");

OutputStreamWriter osw=new OutputStreamWriter(new FileOutputStream("MUBIAOWENJIANLUJING"),"SHEZHIBIANMA");

......

全民快乐8osw.close();

全民快乐8isr.close();


YEKEYIZHEIYANGXIE:

全民快乐8FileReader fr=new FileReader("YUANWENJIANLUJING");

全民快乐8FileWriter fw=new FileWriter("MUBIAOWENJIANLUJING");

......

全民快乐8fr.close();

fw.close();

全民快乐8//LIYONGHUANCHONGQU,GAOXIAODEDUQUZIFU

全民快乐8BufferedReader br=new BufferedReader(new FileReade("YUANWENJIANLUJING");

PrintWriter pw=new PrintWriter("MUBIAOWENJIANLUJING");

......

br.close();

pw.close();


XULIEHUAHEFANXULIEHUA:

//DUIXIANGDEXULIEHUA

全民快乐8ObjectOutputStream oos=new ObjectOutputStream(new FileOutputStream(file));

全民快乐8ZHEILIDEfileZHIDESHI String file="WENJIANZAIXIANGMUZHONGDELUJING";


//DUIXIANGDEFANXULIEHUA

全民快乐8ObjectInputStream ois=new ObjectInputStream(new FileInputStream(file));


4.Java的Socket通信(多线程)

SILU:

①SHOUXIANCHUANGJIANFUWUQIDUANSocket,ZHIDINGBINGZHENTINGMOUYIGEDUANKOU,RANHOUXUNHUANJIANTINGKAISHIDENGDAIKEHUDUANDELIANJIE….

②CHUANGJIANKEHUDUANsocket,ZHIDINGFUWUQIDIZHIHEDUANKOU,RANHOUHUOQUSHUCHULIU,XIANGFUWUQIDUANFASONGQINGQIU,BINGGUANBIsocketSHUCHULIU。

③FUWUDUANJIESHOUDAOKEHUDUANDEQINGQIUHOU,CHUANGJIANXINXIANCHENGBINGQIDONG。

④CHUANGJIANXIANCHENGCHULILEI,ZHIXINGXIANCHENGCAOZUO,HUOQUSHURULIU,FUWUDUANDUQUKEHUDUANYONGHUXIANGQING,GUANBIZIYUAN。

⑤ZHIXINGXIANCHENGCAOZUO,HUOQUSHUCHULIU,XIANGYINGKEHUDUANQINGQIU,KEHUDUANJIESHOUDAOFUWUDUANDEXIANGYING,GUANBIZIYUAN。


JIANDANDIANJIANG,JIUXIANGDANGYUWOGENNISHUOHUA(KEHUDUAN→FUWUDUAN),NISHOUDAOWOSHUODEHUA(FUWUDUAN→XIANCHENGCHULILEI),DANAOJINXINGSIKAOHOU(XIANCHENGCHULILEI),ZUOCHUHUIDAWODEHUA(XIANCHENGCHULILEI→KEHUDUAN)。


5.关系型数据库

SHUJUKUDESANFANSHI:

①ZIDUANBUKEFEN。

②YOUZHUJIAN,FEIZHUJIANZIDUANYILAIZHUJIAN。

③FEIZHUJIANZIDUANBUNENGHUXIANGYILAI。


T-SQL:

全民快乐8ZAIZHENGGESHUJUKUZHONG,CHAXUNCAOZUOZHANJUZENGSHANGAICHADE80%,ERSHUODAOCHAXUN,T-SQLYUJUZIRANBUNENGSHAO。RUTUSHANGSHI。


ZENG:

①CHARUDANXING

全民快乐8insert into

②JIANGXIANYOUDEBIAOSHUJUTIANJIADAOYIGEYIYOUBIAO

insert into

全民快乐8③ZHIJIENAXIANYOUBIAOSHUJUCHUANGJIANYIGEXINBIAOBINGTIANCHONG

select


SHAN:

①SHANCHUMANZUTIAOJIANDEXING

全民快乐8delete from

②SHANCHUZHENGGEBIAO

全民快乐8truncate table

全民快乐8ZHU:SHANCHUBIAODESUOYOUXING,DANBIAODEJIEGOU、LIE、YUESHU、SUOYINDENGBUHUIBEISHANCHU;BUNENGYONGYUYOUWAIJIANYUESHUYINYONGDEBIAO。


GAI:

①GENGXIN

update


ZICHAXUN:

SELECT * FROM t1 WHERE column1 = (SELECT column1 FROM t2);


QIZHONG:

①SELECT * FROM t1 …CHENGWEIWAICHAXUN。

②SELECT column1 FROM t2 CHENGWEIZICHAXUN。


SUOYI,WOMENJIUSHUOZICHAXUNSHIQIANTAOZAIWAICHAXUNNEIBUDE。ERSHISHISHANGTAYEYOUKENENGZAIZICHAXUNNEIBUZAIQIANTAOYIGEHUOZHEDUOGEZICHAXUN。

全民快乐8ZHEILIYAOZHUYI,ZICHAXUNBIXUCHUXIANZAIYUANKUOHAOZHIJIANE。

课程预约

全民快乐8

全民快乐8

全民快乐8