先看看如下代码: public class Test { public static void test() { boolean a = true; boolean b = false; if (a | b) { System.out.println("|"); } if (a & b) { System.out.println("&"); } } public static void main(String[] args){ test(); } }
数字 写在最前,必须要会的:int() 整型 Python3里无论数字多长都用int表示,Python2里有int和Long表示,Long表示长整型 有关数字的常用方法,方法调用后面都必须带括号() int():将字符串转换为整型,且字符串内容只能是数字 a = " b = "123a" c = int(a) d = int(b) # ValueError: invalid literal for int() with base 10: '123a' print(type(c
SpringMVC框架下,如果用ajax向后台请求得方法如果使用@Responsebody返回布尔值的话,ajax得不到任何的回传数据. 但是如果返回String类型,就是正常的. 测试了下代码写得没有任何问题,也不报错.只是在地址栏直接输入ajax请求的url会报404. The resource identified by this request is only capable of generating responses with characteristics not accepta