网上电玩

IT培訓網| | | | | | | |
|
400-650-7353

精品課程

您所在的位置:首頁 > IT干貨資料 > java > 【Java基礎知識】Java中包含哪些運算符

【Java基礎知識】Java中包含哪些運算符

zaijavazhongbaohandeyunsuanfuyou:suanshuyunsuanfu,luojiyunsuanfu,guanxiyunsuanfudeng。

suanshuyunsuanfuyejiushiwomenpingshidejiajianchengchuyudengcaozuo:zaijavazhongdoushijiangyoubiandezhifuzhigeizuobian,suoyiyibangeshiwei:jieguo = zhi;

网上电玩jia(+):result = value1 + value2;liru result = 10 + 10;jieguoresultzhiwei20;

jian(-):result = value1 - value2; liru result = 20 - 10; jieguoresultzhiwei10;

cheng(*): result = value1 * value2; liru result = 20 * 10; jieguoresultzhiwei200;

网上电玩chu(/): result = value1 / value2; liruresult = 20 / 10;jieguoresultzhiwei2;ruguovalue2dezhiwei0,zejavahuipaochuyigeyichang;

yu(%):qiuyu,jihuoqubunengchujindezhi,result = value1 % value2;liruresult = 12 % 5;resultjieguowei2;

zizeng(++):value++huozhe++value;yisishijiangvaluedezhijia1;zizengyouliangzhongxiefa,yizhongshi++zaiqianmian,yizhongshi++zaihoumian,zheliangzhongdandushiyongdeshihoumeiyouqubie,danshiheqitabianlianghuozheqitayufayiqishiyongdeshihou,jiuyouqubiele,++zaiqianshuomingshixianjiangvaluejia1ranhouzaijisuan;++zaihoumianshuomingxianshiyongvaluezaijinxingvaluejia1;liruvalue = 10;result = value++; resultdejieguowei10,valuejieguowei11,yinwei++zaihoumiansuoyixianshiyongvaluefuzhigeiresult,ranhouvaluezaijinxingjia1;zairu:result = ++value; result dejieguowei11,valuedejieguowei11;yinwei++zaiqianmian,suoyivaluezhixianjiayibianchengle11,ranhouzaijiangvaluezhifuzhigeiresult,suoyiresultdejieguowei11;

网上电玩zijian(--):yuzizengyiyangdeluoji,zhibuguoshijiangzishenjinxingjian1;

luojiyunsuanfu:&&(bingqie) ||(huo) !(fei),luojiyunsuanfupanduandebianliangweiboolean,zhiyoutrueyufalse;

【Java基礎知識】Java運算符

bingqie(&&):result = value1 && value2;dangvalue1yuvalue2douweitruedeshihou,resultdejieguoweitrue;dangqizhongrenheyigeweifalsedeshihou,resultjieguoweifalse;erqie,dangvalue1dezhiruguoweifalsedeshihou,value2buhuijinxingpanduan,zhenggejieguoresultdejieguoweifalse;liruif( value != null && value.length() > 10);ruguovalue == null,zezhenggejieguoweifalse,bingqievalue.length()bujinxingpanduan;zheyangruguovalue == null;zehoumianyouyubuhuijinxingyunsuanyejiubuhuifashengyichang;

huo(||):result = value1 || value2; dangvalue1yuvalue2douweifalsedeshihou,resultjieguoweifalse;ruguoyouyigeweitrue,neimeresultjieguoweitrue;bingqieruguovalue1weitruedeshihou,value2buxuyaojinxingpanduan,resultweitrue;

fei(!): result = !value; resultdejieguoyuvaluedejieguoxiangfan;valueweitrue,zeresultweifalse;valueweifalse,zeresultweitrue;

网上电玩guanxiyunsuanfu:(>(dayu), >=(dayudengyu), <(xiaoyu), <=(xiaoyudengyu), ==(dengyu), !=(budengyu)),guanxiyunsuanfadejieguoweibooleanleixingdezhi,zhiyoutruehuozhefalse;

dayu(>):panduandiyigezhishifoudayudiergezhi,ruguomanzutiaojian,zejieguoweitrue;fouzeweifalse;

网上电玩dayudengyu(>=):panduandiyigezhishifoudayudengyudiergezhi;

网上电玩xiaoyu(<):panduandiyigezhishifouxiaoyudiergezhi;

xiaoyudengyu(<=):panduandiyigezhishifouxiaoyudengyudiergezhi;

网上电玩dengyu(==):panduanlianggezhishifouxiangdeng;

budengyu(!=):panduanlianggezhishifoubuxiangdeng;

課程好禮申請領取

网上电玩网上电玩游戏

官方微信

掃描上方二維碼或者手動搜索ujiuye,關注【网上电玩 】,每日推送行業資訊、干貨資料、熱門話題、招聘信息和求職攻略,還有不定期的優惠活動一手發布!

>>本文地址:
注:本站稿件未經許可不得轉載,轉載請保留出處及源文件地址。

相關推薦

趁年輕 學門技術充個電
0元
入學
30天免費試學, 3000
直減優惠
立即
搶占
2周
特訓
價值299的特訓營課程,
9.9元搶購
立即
搶購
80G
資源包
IT行業11類熱門崗位全套資源包
立即
領取
課程資料、活動優惠 領取通道
 
 
  • 返回頂部
电玩_电玩捕鱼_电玩捕鱼城 电玩捕鱼_电玩捕鱼游戏_电玩城捕鱼游戏 电玩城捕鱼_电玩城游戏_电玩捕鱼游戏 电玩游戏大厅 电玩游戏大厅