A./etc/prtconf
B./etc/qconfig
C./etc/lpconfig
D./etc/prtconfig
第1题:
Manually,yousettheconsumergroupofallofthenewlycreateduserstoMYDB_GRP.Youwanttheuserstobeabletochangetheirconsumergroupsaspertheapplicationrequirement.Whatwasthefirststepthatwasneededintheprocesstoachievethisobjective?()
A.TheusermusthavebeengrantedtheDBArole.
B.Theusermusthavebeengrantedtheswitchprivilegeasapartofarole.
C.TheusermusthavebeengrantedtheResourceManageradministratorprivilege.
D.TheusermusthavebeengrantedtheswitchprivilegebyusingtheDBMS_RESOURCE_MANAGER_PRIVSpackage.
第2题:
本程序的功能是监听对于菜单项和工具条按钮的操作。主窗口中有菜单、工具条和一个文字标签,菜单中有“文件”项,“文件”菜单中包括菜单项“新建”、“保存”、“打印”、“页面设置”和“退出”,工具条上包括按钮“新建”、“保存”、“打印”、“页面设置”和“退出”。单击任何一个菜单项或任何一个工具条按钮,文字标签都会显示哪个构件被选中。请更正题中带下划线的部分。运行结果如下图所示。
注意:不改变程序的结构,不得增行或删行。
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class advance extends JFrame
{
private JLabel actionlnfo;
public advance(String titleText)
{
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
super(titleText);
actionInfo=new JLabel("事件信息");
JToolBar tb=new JTooBar();
Menu file=new Menu( "文件" );
JMenuBar mb=new JMenuBar();
mb.add(file);
NewAction na=new NewAction(actionInfo);
file.add(na);
tb.add(na);
SaveAction sa=new SaveAction(actionInfo);
file.add(sa);
tb.add(sa);
PrintAction pta=new PrintAction(actionInfo);
file.add(pra);
tb.add(pra);
PageSetAction psa=new PageSetAction(actionInfo);
file.add(psa);
tb.add(psa);
ExitAction ea=new ExitAction(actionInfo);
file.add(ea);
tb.add(ea);
setJMenuBar(mb);
Container cp=getContentPane();
cp.setLayout(new BorderLayout());
cp.add(tb);
cp.add(actionInfo, BorderLayout.CENTER );
setSize(350, 200);
setVisible(true);
}
public static void main(String[] args)
{
new advance("advance");
}
}
class NewAction extends AbstractAction
{
JLabel label;
public NewAction(JLabel label)
{
super("新建");
this.label=label;
}
public void actionPerformed(ActionEvent e)
{
label.setText("您选择了新建");
}
}
class SaveAction extends AbstractAction
{
JLabel label;
public SaveAction(JLabel label)
{
super("保存");
this.label=label;
}
public void actionPerformed(ActionEvent e)
{
label.setText ("您选择了保存");
}
}
class printAction extends AbstractAction
{
JLabel label;
public PrintAction(JLabel label)
{
super("打印");
this.label=label;
}
public void actionPerformed(ActionEvent e)
{
label.setText ("您选择了打印");
}
}
class PageSetAction extends AbstractAction
{
JLabel label;
public pageSetAction(JLabel label)
{
super("页面设置");
this.label=label;
}
public void actionPerformed(Actio
第3题:
________ the vessel have no safety radiotelegraphy certificate at the time of her delivery,she ________ be held to be unseaworthy.
A.If/may
B.Will/shall
C.Should/would
D.Would/should
第4题:
From your Windows 2000 Professional computer, you need to print from a 16-bit accounting application to a network printer named Printer02. Printer02 is attached to a print server named PrtSrv. The accounting application allows you to print only to a local LPT port.
You currently have two printers attached to your local LPT1 and LPT2 ports. You need to be able to print to the network printer and to both local printers. You install the driver for the network printer on your computer.
What must you do next to enable printing on the network printer?
A.Create a new local printer port named PrtSrv\Printer02, and configure the printer to use the new port.
B.Create a new local printer port named PrtSrv\Printer02. In the properties for the new port, select the option to print directly to the printer. Configure the printer to use the new port.
C.Run thenet use Lpt3: \\PrtSrv\Printer02command.
D.Run thenet print\\PrtSrv\Printer02command.
第5题:
以下程序是一个简单文本处理器,菜单项可以打开、编辑、保存一个文件。文件内容显示在下面的文本区域中(提示,打开文件通过文件选择器来完成)。请改正程序中的错误(有下划线的语句),使程序能输出正确的结果。运行结果如下图所示。
注意:不改动程序的结构,不得增行或删行。
import java.awt.*;
import java.awt.event.*;
import java.io.* ;
import javax.swing.*;
class FileFrame. extends JFrame
{
File file;
JTextPane textpane;
FileInputStream readStream;
JScrollPane scroll;
public FileFrame()
{
super ("文件浏览");
JMenu fileM = new JMenu("文件");
OpenAction pen = new OpenAction ();
SaveAction clear = new SaveAction ();
ExitAction exit = new ExitAction();
JMenuBar mb = new JMenuBar();
fileM.add(open);
fileM.add(clear);
fileM.add(exit);
mb.add(fileM);
textpane=new JTextPane();
scroll=new JScrollPane(textpane);
getContentPane().add(scroll);
getContentPane().addJMenuBar(mb);
}
class OpenAction extends AbstractAction
{
public OpenAction ()
{
super("打开");
}
public void actionPerformed( ActionEvent e )
{
JFileChooser chooser=new JFileChooser();
int state=chooser.showOpenDialog(null);
file=chooser.selectedFile();
if(file!=null&&state==JFileChooser.APPROVE_OPTION)
{
try
{
readStream=new FileInputStream(file);
textpane.read(readStream, this);
readStream.close();
}
catch(IOException ioE){}
}
}
}
class SaveAction extends AbstractAction
{
public SaveAction()
{
super("保存");
}
public void actionPerformed( ActionEvent e )
{
if(file==null)
return;
try{
FileWriter ut = new FileWriter(file);
out.read(textpane.getText());
out.close();
}
catch (IOException ioE)
{}
}
}
class ExitAction extends AbstractAction
{
public ExitAction()
第6题:
______ it rain tomorrow moring, the loading ______.
A.Should / will be postponed
B.If / shall be postponed
C.Should / would be postponed
D.If / has to be postponed