JAVA试题(100道) —————————————————————————————————————— 题目1: 下面不属于基本类型的是:c (选择1项) A) boolean B) long C) String D) byte 题目2:d 如下程序中: (1)public class CharToInt (2){ (3) public static void main(String[] args) (4) { (5) int a,b=10; (6) char c='语'; (7) a=b+c
java在JFrame上加文字Demo,用重写JPanel的public void paint(Graphics g)方法实现即可,主要代码:
Override
public void paint(Graphics g)
{
super.paint(g);
Font font = new Font("宋体",Font.PLAIN,30);
g.setColor(Color.RED);
g.setFont(font);
g.drawString("30pt