Home > front end >  Could you tell me why 2 countb counta==1?
Could you tell me why 2 countb counta==1?

Time:10-07

<% @ page import="Java. Text. SimpleDateFormat Java. Util. Date" % & gt;
<% @ page language="Java" pageEncoding="utf-8" % & gt;


JSP operation principle & lt;/title> <br/></head> <br/><body> <br/><%! CountA//JSP declaration: declare an integer, and initialized to 0 <br/>Int countA=1; %> <br/><% <br/>//Java scriptlets script, declare an integer countB and should be initialized to 0 <br/>Int countB=0; <br/>%> <br/><%="countA=" + + + countA % & gt; <Br/& gt; <br/><%="countB=" + + + countB % & gt; <Br/& gt; <br/></body> <br/></html> <br/><p class="article - content rp"> CodePudding user response: </p>This is not very normal countA default is 1 countB default is 0 + + a + is run before assignment is ascribed value after shipment, you should is to want to know the difference between a + + a and +, demo write wrong,<p class="article - content rp"> CodePudding user response: </p><fieldset> <legend> references for 1/f, the emperor god reply: <legend> <blockquote> this is not very normal countA default is 1 countB default is 0 + + a + is run before assignment is ascribed value after shipment, you should is to want to know the difference between a + + a and +, demo are written wrong, </blockquote> <fieldset> <br/>No, I made a mistake, the original counta is equal to zero, I changed the forget to come back, that is to say, counta is equal to 1 cases, the final result is equal to 3<p class="article - content rp"> CodePudding user response: </p><fieldset> <legend> references for 1/f, the emperor god reply: <legend> <blockquote> this is not very normal countA default is 1 countB default is 0 + + a + is run before assignment is ascribed value after shipment, you should is to want to know the difference between a + + a and +, demo are written wrong, </blockquote> <fieldset> <br/>And the operator of a and b is not the same<p class="article - content rp"> CodePudding user response: </p><fieldset> <legend> reference any ses reply: 3/f <legend> <blockquote> <fieldset> <legend> Quote: refer to 1st floor eutopean royal god reply: <legend> <blockquote> this is not very normal countA default is 1 countB default is 0 + + a + is run before assignment is ascribed value after shipment, you should is to want to know the difference between a + + a and +, demo are written wrong, </blockquote> <fieldset> <br/>And the operator of a and b is not the same </blockquote> <fieldset> <br/><br/>Counta and countb initialization is 0 1 is a Java is a javascript and then after + + output does not agree? Can I say can't write wrong? You must be the code, you can run the code and your screenshot to see as a result, </div> <div class="th_page th_page_color"></div> <div class="umCopyright"> <p>Page link:<a href="/frontend/55571.html" target="_blank" style="color:#999">https//www.codepudding.com/frontend/55571.html</a></p> </div> <div class="detail-arr"> <div class="detail-arr-left">Prev:<a href='/frontend/55570.html'>Bosses for help!!!!!!!!!! Js implementing page to page b b js action of the page</a></div> <div class="detail-arr-right">Next:<a href='/frontend/55572.html'>Vue: used in the summary - method="getSummaries summarize the decimal point</a></div> </div> </div> </div> </div> </div> <div class="container th_top"> <div class="row"> <div class="col-md-12"> <div class="hot-tags neitags"> <ul> <li><i class="iconfont icon-x-tags"></i> Tags:  </li> <a href='/e/tags/?tagname=other' target='_blank'>other</a> </ul> </div> </div> </div> </div> <div class="container th_top"> <div class="row"> <div class="col-md-12"> <div class="xiangguan"> <ul class="msg msghead"> <li class="tbname">Related</li> </ul> <ul> </ul> </div> </div> </div> </div> <div class="container th_top"> <div class="row"> <div class="col-md-12"> <div class="flinks"> <ul> <li><i class="iconfont icon-x-tags"></i> Links:  </li> <li class="liflinks"><a target="_blank" href="/" title="CodePudding">CodePudding</a></li> </ul> </div> </div> </div> </div> <div class="footer"> <p><span style="font-size:16px;color:#666;font-weight: bold">About Us:</span>  <a href="https://www.codepudding.com/contact.html">Contact Us</a>      <a href="https://www.codepudding.com/service.html">Terms of Service</a>      <a href="https://www.codepudding.com/privacy.html"> Privacy Policy</a></p> <p class="foot_info">Copyright © 2010-2023,Powered By <a href="/" target="_blank">CodePudding</a> </p> </div> <script type="text/javascript" src="/skin/code/tianhu.js"></script> </body></html>