⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 checkstring.java

📁 java对象 创建新对象访问和设置类变量和实例变量 对象引用
💻 JAVA
字号:
class CheckString {
 
    public static void main(String[] arguments) {
        String str = "Nobody ever went broke by buying IBM";
        System.out.println("The string is: " + str);
        System.out.println("Length of this string: "
            + str.length());
        System.out.println("The character at position 5: "
            + str.charAt(5));
        System.out.println("The substring from 26 to 32: "
            + str.substring(26, 32));
        System.out.println("The index of the character v: "
            + str.indexOf('v'));
        System.out.println("The index of the beginning of the "
            + "substring \"IBM\": " + str.indexOf("IBM"));
        System.out.println("The string in upper case: "
            + str.toUpperCase());
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -