小编Meh*_*Meh的帖子

删除字符串中位置的字符

目前我正在开发一个项目,该项目需要在字符串中的设定位置使用char.有一个简单的方法吗?

java string

3
推荐指数
2
解决办法
4万
查看次数

如果语句错误,找不到符号

我一直在为一个小程序编写乐趣,但我收到了这个错误:

Compilation error   time: 0.11 memory: 380672 signal:0Main.java:22: 
error: cannot find symbol
            string dtext = "One";
        ^
  symbol:   class string
  location: class Ideone
Main.java:37: error: cannot find symbol
        System.out.println(dtext);
                       ^
  symbol:   variable dtext
  location: class Ideone
2 errors
Run Code Online (Sandbox Code Playgroud)

我的代码:

import java.util.*;
import java.lang.*;
import java.io.*;
import static java.lang.System.*;
import java.util.Scanner;
import java.lang.String;

class Ideone
{
public static void main (String str[]) throws IOException
{
    Scanner sc = new Scanner(System.in);

    //System.out.println("Please enter the month of birth");
    //int month = sc.nextInt();
    System.out.println("Please …
Run Code Online (Sandbox Code Playgroud)

java symbols compiler-errors

1
推荐指数
1
解决办法
3949
查看次数

标签 统计

java ×2

compiler-errors ×1

string ×1

symbols ×1