首页
学习
活动
专区
圈层
工具
发布
  • 您找到你想要的搜索结果了吗?
    是的
    没有找到

    Java学习笔记(持续更新ing)

    //down的地址https://blog.csdn.net/fyp19980304/article/details/80448060 方法一:把要存储的数据设为私有变量,然后另写函数对其进行读写,set...return y; } public void setY(int y) { this.y = y; } } 方法二: 把要存储的数据设为public变量,在其他主函数类中直接访问修改...DecimalFormat df = new DecimalFormat(".00"); System.out.println(df.format(d)); //方法二:直接通过String类的format函数实现...,这样才能正确的分隔开,不能用String.split("."); 2、如果用“|”作为分隔的话,必须是如下写法,String.split("\\|"),这样才能正确的分隔开,不能用String.split...,把三个都分隔出来,可以用String.split("and|or"); 使用String.split方法分隔字符串时,分隔符如果用到一些特殊字符,可能会得不到我们预期的结果。

    79030

    Python中的元组,字典、计算器代码实

    Author :FengXiaoqing # @file   :jsq.py def add(string):     total = 0     numbers = []     numbers += string.split...0} = {1}".format(string,total)) def reduce(string):     result = 0     numbers = []     numbers += string.split... = {1}".format(string,result))      def ride(string):     total = 1     numbers = []     numbers += string.split...()             m.update(n)      m,n都是dict pop(k)                删除k:v 对应的元素 zip(l1,l2)            高阶函数...startswith   endswith python 2 和3 中的区别: python 2  print 支持    print s1,s2,s3   就是不回车在一行 python 3 print 包装成一个函数

    2K10
    领券