zoukankan      html  css  js  c++  java
  • 关于我学了因为java又回来这档事

    持续更新中.......


    1.Hi, again.

    /*
     * To change this license header, choose License Headers in Project Properties.
     * To change this template file, choose Tools | Templates
     * and open the template in the editor.
     */
    package helloworldagain;
    
    /**
     *
     * @author gengyf
     */
    public class HelloWorldAgain {
    
        /**
         * @param args the command line arguments
         */
        public static void main(String[] args) {
            // TODO code application logic here
            System.out.print("Hello World Again!");
        }
        
    }

    2.something like a+b

    import java.util.*;//java中输入所需调用的东西
    public class Main {
        public static void main(String[] args) {
         int a,b; Scanner in
    =new Scanner(System.in);//输入前的准备 a=in.nextInt();b=in.nextInt();//输入 System.out.println(a+b);//输出 } }

    注意:将代码提交到OJ上时,需要将程序前的package删掉,并将主函数名改为Main

    3.something about math

    4.an other function

    5.字符串转字符数组

    String ss=in.nextLine();//读入一整行
    char[] a=ss.toCharArray();//把这一行的每个字符转存在数组里
  • 相关阅读:
    百度点聚合功能,自定义针头功能
    iOS之极光推送
    iOS之短信认证
    iOS FMDB
    iOS 远程推送
    iOS之本地推送(前台模式与后台模式)
    iOS指纹识别
    关于——GCD
    关于——NSThread
    给label text 上色 && 给textfiled placeholder 上色
  • 原文地址:https://www.cnblogs.com/gengyf/p/15405129.html
Copyright © 2011-2022 走看看