小编gle*_*hen的帖子

intellij-idea 系统找不到指定的文件,

有人能帮我吗?我对编程还很陌生,我决定尝试从 eclipse 来的 IDEA,但我遇到了一个问题,我从 eclipse 导入了一个可以工作的项目,但在 IDEA 中,我无法像在 eclipse 中那样引用我的 res 文件夹,就像我一样不能使用 res/image.png 我只能做 c:\ect。有谁知道为什么?我已将 res 文件夹设置为资源根目录。

java eclipse intellij-idea

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

变化值变化原因不明?

我应该知道这个,但为什么这会openPos[1]变为0?我知道它必须做与startPos[1] = 0findCloseCurlBracket()方法,但为什么它做它没有意义.

int[] openPos = {1, 26};
    System.out.println(openPos[0]+", "+openPos[1]);
    int[] closePos = LuaTableParser.findCloseCurlBracket(stringList, openPos);
    System.out.println(openPos[0]+", "+openPos[1]);
Run Code Online (Sandbox Code Playgroud)

findCloseCurlBracket()方法:

public static int[] findCloseCurlBracket(List<String> text, int[] openPos) {
    int[] startPos = openPos;
    int counter = 1;
    for(int line = startPos[0]; line < text.size(); line++){
        for(int index = startPos[1]; index < text.get(line).length()-startPos[1]; index++){
            int[] curPos = {line, index};
            if(getStringListCharAt(text, curPos) == '{'){
                counter++;
            }else if(getStringListCharAt(text, curPos) == '}'){
                counter--;
            }
            if(counter == 0){
                startPos[1] = 5;
                return …
Run Code Online (Sandbox Code Playgroud)

java

0
推荐指数
2
解决办法
81
查看次数

标签 统计

java ×2

eclipse ×1

intellij-idea ×1