从本教程运行程序时,为什么在调试屏幕中看不到值?

时间:2018-11-30 03:08:35

标签: java

https://www.youtube.com/watch?v=bWHYjLJZswQ&t=9s

使用此代码块时:

package com.tutorial.main;

import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;

public class KeyInput extends KeyAdapter{

    public void keyPressed(KeyEvent e) { //when a key is pressed, the number value will be displayed.
        int key = e.getKeyCode();

         System.out.println(key);

    }
    public void keyReleased(KeyEvent e){

    }

}

在本教程中,当程序运行时,按这些键时,我看不到调试窗口中的值。

0 个答案:

没有答案