判断题

【参考答案】

正确
(↓↓↓ 点击‘点击查看答案’看答案解析 ↓↓↓)

相关考题

判断题 (2016年真题) 报告期内的房价水平,通常用不同类型房屋的中位数或平均数价格表示。()

问答题 本题的功能是用按钮来控制文本框中文本的颜色。窗口中有两个带有文字标题的面板“Sample text”和“Text color control”,窗口的底部还有一个复选按钮“Disable changes”。在“Sample text”面板中有一个带有字符串的文本框,而在“Text color control”面板中有三个按钮:“Black”、“Red”和“Green”,并且每个按钮上都有一个对应颜色的圆。单击任意按钮,文本框中的文本变成对应的颜色,如果选中“Disable changes”复选项,则三个颜色按钮变为不可用,如果取消选中复选项,则三个按钮变为可用。 import javax.swing.*; import java.awt.*; import java.awt.event.*; public class java3 extends JFrame{ private JPanel upper,middle,lower; private JTextField text; private JButton black,red,green; private JCheckBox disable; public java3(String titleText){ super(titleText); addWindowListener(new WindowAdapter(){ public void windowClosing(WindowEvent e){ System.exit(0); } } ); upper=new JPanel(); upper.setBorder(BorderFactory.ereateTitledBor- der("Sample text")); upper.setlayout(new BorderLayout()); text=new JTextField("Change the color of this text"): upper.add(text,BorderLayout.CENTER); middle=new JPanel(); middle.setBorder(BorderFactory.createTitledBor- der("Text color control")); middle.setLayout(new FlowLayout(FlowLayout. CENTER)): black=new JButton("Black",new ColorIcon (Color.black)); black.addActionListener(new ButtonListener (Color.black)); middle.add(black); red=new JButton("Red",new ColorIcon(Col- or.red)); red.addActionListener(new ButtonListener(Col- or.red)); middle.add(red); green=new JButton("Green",new ColorIcon (Color.green)); green.addActionListener(new ButtonListener (Color.green)); middle.add(green); lower=new JPanel(); lower.setLayout(new FlowLayout(FlowLayout. RIGHT)); disable=new JCheckBox("Disable changes"): disable.addItemListener(new ItemListener()( public void itemStateChanged(ItemEvent e){ boolean enabled =(e.getStateChange() = =ItemEvent.DESELECTED): black.setEnabled(enabled); red.setEnabled(enabled); green.setEnabled(enabled); } } ); lower.add(disable); Container cp=getContentPane(); cp.add(upper,BorderLayout.NORTH); cp.add(middle,BorderLayout.CENTER); cp.add(10wer,BorderLayout.SoUTH); pack(); setVisible(true); } class ButtonListener extends ActionListener{ private Color c; public ButtonListener(Color c){ this.c=c; } public void actionPerformed(ActionEvent e){ text.setForeground(c); } } class ColorIcon implements Icon{ private Color c; private static final int DIAMETER=10; public ColorIcon(Color c){ c=c; } public void paintlcon(Component cp,Graphics g, int x,int y){ g.setColor(c); g.fillOval(X,y,DIAMETER,DIAMETER); g.setColor(Color.black); g.drawOval(x,y,DIAMETER,DIAMETER); } public int getlconHeight(){ return DIAMETER; } public int getlconWidth(){ return DIAMETER; } } public static void main(String[]args){ new java3("advance"); } }

判断题 对授信中的国别风险进行识别,商业银行应确保国际授信和国内授信适用不同的原则。

判断题 城市地下综合管廊、城市停车场项目可以在规定最低资本金比例基础上适当增加。

判断题 在2006年发布的会计准则下,货币资金和长期股权投资不包含在应进行四分类的金融资产中。 ( )

判断题 银行外汇牌价表中的现汇买入价/现钞买入价/现汇卖出价/现钞卖出价都是以客户为主体的表示方法。(  )

问答题 本题的功能是监听鼠标的操作。鼠标置于窗口中单击时(左键或右键),在单击的地方会画一个小矩形,如果将鼠标置于小矩形上,则鼠标光标状态改为小十字,按下鼠标左键可拖曳,双击鼠标左键(或右键)时,小矩形消失。 import java.awt.*; import java.awt.event.*; import java.util.*; import java.awt.geom.*; import javax.swing.*; public class java3 { public static void main(String[]args) { MouseFrame frame=new MouseFrame(): frame.setDefaultCloseOperation(JFrame.EXIT_ oN_CLOSE); frame.show(); } } class MouseFrame extends JFrame { public MouseFrame() { setTitle("java3"); setSize(DEFAULT WIDTH, DEFAULT HEIGHT): MousePanel panel=new MousePanel(); Container contentPane=getContentPane(); contentPane.add(panel); } public static final int DEFAULT_WIDTH=300; public static final int DEFAULT_HEIGHT=200; } class MousePanel extends JPanel { public MousePanel() { squares=new ArrayList(); current=null: addMouseListener(new MouseHandler()); addMouseMotionListener(new MouseMotionHan- dler()); } public void paintComponent(Graphics g) { super.paintComponent(g); Graphics2D g2=(Graphics2D)g; for(int i=0;i<squares.size();i++) g2.draw((Rectangle2D)squares.get(i)); } public void find(Point2D p) { for(int i=0;i<squares.size();i++) { Rectangle2D r=(Rectangle2D)squares.get(i); if(r.contains(p))return r; } return null: } public void add(Point2D p) { double x=P.getX(); double Y=P.getY(): current=new Rectangle2D.Double( x-SIDELENGTH/2. y-SlDELENGTH/2. S1DELENGTH, SIDELENGTH); squares.add(current); repaint(); } public void remove(Rectangle2D s) { if(S= =null)return: if(S= =current)current=null; squares.remove(s): repaint(); } private static final int SIDELENGTH=10: private ArrayList squares; private Rectangle2D current; private class MouseHandter extends MouseAction- Listener { public void mousePressed(MouseEvent event) { current=find(event.getPoint()); if(current= =null) add(event.getPoint()); } public void mouseClicked(MouseEvent event) { current=find(event.getPoint()); if(current!=null&&event.getClickCount() >=2) remove(current); } } private class MouseMotionHandler implements Mouse- MotionListener { public void mouseMoved(MouseEvent event) { if(find(event.getPoint)= =null) setCursor(Cursor.getDefaultCursor()); else setCursor(Cursor.getPredefinedCursor (Cursor.CROSSHAIR_CURSOR)); } public void mouseDragged(MouseEvent event) { if(current!=null) { int x=event.getX(): int Y=event.getY(); 、 current.setFrame( x-SIDELENGTH/2, Y-SlDELENGTH/2. SIDELENGTH, SIDELENGTH); repaint(); } } } }

判断题 中央银行的产生是集中统一银行券发行的需要。

问答题 本题的功能是计算二维数组各个元素的和。程序中定义了二维数组arr,arr有3行4列共l2个元素,程序中采用for循环语句的嵌套来计算数组中各个元素的和,并将结果保存在sum变量中,最后打印输出结果。 public class javal{ public static void main(String[] args){ int arr[][]={{l,2,3,4},{5,6,7,8},{9,10,11,12}}; int sum=0; int i=0,j=0; for(i=0; ) for( ) ; System.OUt.println("sum="+sum); } }

判断题 中国银行业协会对违反职业道德规范和其他违法行为的内部审计部门负责人和直接负责人追究责任。