1. Trang chủ
  2. » Công Nghệ Thông Tin

Theory DCJ

18 290 7
Tài liệu đã được kiểm tra trùng lặp

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 18
Dung lượng 374 KB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

Đề thi aptech

Trang 1

Question Excerpt From DCJ for Distributed Computing in Java- Aptech Computer Education

Q.1) which statements are true?

A. A properties file contains the information that already translated into an Internationalized

program

B. We do not need to create a properties file with the naming convention for every country

C. A Locale is an identifier for a particular combination of language and region

D. To create a properties file you can use any plain text editor including Notepad

E. we need not include ".properties" as an extension for property file

Q.2) which statements are true?- 3 choices

A. TCP is a connection-based protocol that provides a reliable flow of data between two computer

B. You do not write programs at the lower level like application, instead you generally

program at the transport level

C. Java provides the java.net package which contains all the necessary classes to perform system-independent network communications

D. TCP guarantees that data sent from one end of the connection is received at the other end

E. The first layer in the TCP protocol is the network layer

Q.3) Which statements are true?

A. Once the pattern is applied to the MessageFormat instances, you invoke the getString();

B. The MessageFormat class can be used to create a compound message

C. The applyPatern() method is used to fetch an element from the Resource Bundle

D. A template is a string, which contained only the fixed part of the message

E. The date and numeric values contained in a message need not to be translated

Q.4) This is responsible for determining whether the component should react to any input events from input devices such as the keyboard or mouse

B. Controller

Q.5) Event handling of JTextField

are:

A.

addFocusListener(new FocusListener(){

public void focusGained(FocusEvent fe){

}

public void focusLost(FocusEvent ev){

}

});

B.

addItemListenner(new ItemListenner(){

public void itemStateChanged(ItemEvent e){

}

});

Q.6) Lightweight components includes:- 3 choices

Trang 2

A. JPanel, FormattedTextField

B. JFrame,

C. JCheckBox,

JRadioButton

D. JButton,JPasswordTextField

E. JLabel

Q.7) If an error occurs when creating a socket an IOException is thrown.

B. False

Q.8) Event Handling of JComboBox is :

- 2 choices

A. addListSelectionListener

B. ListSelectionListener Vs valueChanged()

C. ActionListener() Vs actionPerformed()

D. addActionListener

Q.9) Which statements are true?- 3 choices

A. The java.rmi.Remote interface server to distinguish interfaces which are non remote

B. A RMI application has to expose methods, which remote clients can invoke

C. The java.rmi.Remote is a maker interface

D. The skeleton resides on the client side

E. The stub resides on the server side

Q.10) If the host does not exist, the Constructor Socket(String host,int port); will

throws

A. an UnknownHostException

B. an IOException

Q.11) This supports a technology called 'pluggable-Look-And-Feel' where components can be

displayed as on any operating system

A. SWing

Q.12) Which components are the General-Purpose Container.- 3 choices

A. JPanel

B. JLayeredPanel

D. JApplet

E. JInternalFrame

Q.13) TCP (Transmission Control Protocol) includes:

Trang 3

- 3 choices

A. Port 20 FTP, Port 21 FTP

B. Port 161

SNMP

C. Port 23 Telnet

D. Port 162 SNMP

E. Port 25 SMTP

Q.14) which statements are true?- 2 choices

A. The port numbers ranging from 0 to 1023 are reserved

B. The physical connection is logically numbered within a range of 0 to 65500

C. The destination address identifiers the computer

Q.15) MVC Architecture decomposes components:

A. Code to maintain data

B. Code to view data

C. Code to represent graphics

D. Code contains in three Models

E. Code to control user interactions

Q.16) Which a three layered architecture is based on?

A. Stub and Skeleton Layer

B. Stub Reference Layer

C. Remote Reference Layer

D. Transport Reference Layer

E. Transport Protocol Layer

Q.17) Which statements are true?

A. Internationalized software is developed separately for each country and language

B. Successful translation of the source files in the desired language is very difficult

C. Cost of development of the product in the desired language will be much lower than one time cost

D. Internationalized software should be developed such that it can be adapted without engineering changes

E. Internationalization is process of the designing an application so that it can adapt to

various

Q.18) JList can be supported scrolling inherently by JScrollPane as JComboBox

B. False

Q.19) This layer is responsible for setting up connections using sockets.It listens for incoming calls, and manages requests from remote reference layer

A. Stub and Skeleton Layer

B. Transport Protocol Layer

C. Remote Reference Layer

Q.20) Which statements are True?

A. A sever must retrieve the InputStream and OutputStream from the proxy socket object to comunicate with the client

Trang 4

B. when a client requests, the accept() method creates an object of class ServerSocket and return it

C. The accept() method is a blocking method

D. The ServerSocket class has a method clientAccept() for listening to client request

E. The accept method, once invoked, will wait till a client request for a connection

Q.21)

This is a protocol that sends independent package of data, called datagrams, from one computer to another with no quarantee about its transmission it is not connect - based protocol

Q.22) The root panel has four parts :

A. Glass Panel,Content Panel

B. JPanel

C. Layered Panel

D. ToolBar Panel

E. Menu Bar

Q.23) Which Statements are true?- 3 choices

A. A Java application can only invoke the methods of the classes available inside JVM

B. Distributed computing revolves around client-server technology

C. RMI doesnot allows a Java program running inside a JVM to execute a method of a class

available in another JVM

D. Java provides the java.rmi package which contains all the necessary class and interfaces to support distributed computing in Java

E. It is not possible for client and server applications, using RMI and running on diffrent machines to comunicate amongst themselves Q.24) Which methods is used for registering listener-objects of JCheckBox ?

A. AddActionListener();

B. AddItemListener();

Q.25) Which statements are true?

A. The Java Foundation Class were introduced since JDK 1.0

B. The JFC includes 2D graphics support

C. Swing is based on a tookit

D. Swing supports a technology called "Pluggable Like and Feel"

E. JFC is a graphical framework

Q.26) Event handling of JTextArea is:

A. None - Event Handling

B. addFocusListener(new FocusListener(){

public void focusGained(FocusEvent fe){

}

public void focusLost(FocusEvent ev){

Trang 5

});

C.

addActionListener(new ActionListener(){

public void actionPerformed(ActionEvent ev){

}

});

Q.27) This is a Java program which is meant to run as a part of a web page.

B. JApplet

C. JDialog

D. JPanel

Q.28) which statements are true?

- 4 choices

A. The getCurrencyInstance() returns an instance of a NumberFormat class initialized to the specified locale

B. The argument passed can only be primitive data type

C. The getCurrencyInstance() takes an instance of Locale class as an argument

D. The date and time format need not conform to the conventions of the end user's Locale

E. Formatting the captions of the GUI components ensures that the look and feel of the application is in a locale-sensitive manner Q.29) This depicts the graphical part on the screen.It takes the data and various states from the

Other part to render the component's graphical part

A. Controller

Q.30) This is used to create a GUI-based application It is available in the javax.swing package.

A. JFrame

B. JApplet

C. JPanel

Q.31) This class is both a container and a components.

B. JApple

D. JDialog

E. JPanel

Q.32) Event handling of JCheckBox are:

A. addItemListenner(new ItemListenner(){

public void itemStateChanged(ItemEvent e){

Trang 6

});

B.

addActionListener(new ActionListener(){

public void actionPerformed(ActionEvent ev){

}

});

C.

addFocusListener(new FocusListener(){

public void focusGained(FocusEvent fe){

}

});

Q.33) Event Handling of JList are:- 3 choices

A. ActionListener interface

B. ListSelectionListener

C. actionPerformed() method

D. valueChanged(); method

E. addListSelectionListener()

Q.34) Which statements are true?

- 2 choices

A. The translation of text is the least time - consuming part of the localization process

B. localization is the process of adapting software for a specific

region

C. Textual elements are stored outside the source code and retrieved dynamically

D. Textual elements such as label and messages for GUI components are hard-coded in the program

E. Support for new languages require recompilation

Q.35) An Icon can be added as a corner component to the JScrollPane.

A. true

B. false

Q.36) This is a Component which lets the user to select a numberic value within a bounded range

A. JRadioButton

B. JButton

C. JSlider

D. JPanel

Q.37) Which statement is true?

A. JSlider SL;

SL.addChangeListener(new ChangeListener(){

public void stateChanged(ChangeEvent e){

Trang 7

// ction Code;

}

});

B.

JSlider SL;

SL.addChangeListener(new ChangeListener(){

public void statechanged(ChangeEvent e){

// ction Code;

}

});

C.

JSlider SL;

SL.addChangelistener(new ChangeListener(){

public void stateChanged(ChangeEvent e){

// ction Code;

}

});

D.

JSlider SL;

SL.addChangeListener(new ChangeListener(){

public void stateChanged(Changeevent e){

// ction Code;

}

});

Q.38) Any valid number, uses Character.isDigit in MaskFormatter class

Q.39) This method is used to add a vertically long component as the row header the componentsscroll up and down when the vertical scrolling

A. setRowHeaderView(Component view);

B. setColumnHeaderView(Component view);

Q.40) This Method is used to add a horizontally long component as the column header.

A. public void setHorizontalScrollBarPolicy(int policy)

B. public void setColumnHeaderView(Component view)

C. public void setRowHeaderView(Component view)

Q.41) Any hex character (0-9, a-f or A-F).

Q.42) This is as part of its view provides four corners where you can add components.

Trang 8

A. JLabel

C. JScrollPane

D. JPanel

Q.43) valid values of orientation in Method of JSlider are:-2 choices

A. SwingConstants.HORIZONTAL

B. Swing.Constant.HORIZONTAL

C. Swing.Constants.VERTICAL

D. public void setOrientation(int orientation);

E. SwingConstants.VERTICAL

Q.44) Any character (Character.isLetter) All upper case letters are mapped to lower case

Q.45) Which are True? 2 choices

A. The component added using setColumnHeaderView() method scrolls left and right

B. The setColumnHeaderView() method is used to add vertically long componnt

C. The Event of the ScrollPanel are handled inherently

Q.46) To create a formatted textfield with a customized format, you use the

A. JFormattedTextField class

B. MaskFormatter class

C. NumberFormat class

Q.47) Anything in MaskFormatter class.

Q.48) Consider a slider with the range 0 to 20, you want to get 5 ticks between each major ticks

you must use method:

A. public void setMinorTickSpacing(int spacing)

B. public void setSnapToTicks(boolean set)

C. public void setMajorTickSpacing(int spacing)

Q.49) Any character (Character.isLetter)

Q.50) The language code consisting of two or more letters in Lower case and the country code consisting of two letter in uper case

B. False

Trang 9

Q.51) If you have a slider with the range 0 to 20 and major tick spacing set to 10, then you you will get at 0,10, and 20 So that Method is:

A. public void setMinorTickSpacing(int spacing)

B. public void setMajorTickSpacing(int spacing)

C. public void setSnapToTicks(boolean set)

Q.52) Which Statement is true?

A. JSlider sl;sl = new JSliDer(SwingConstant.VERTICAL,0,255,0);

B. JSlider sl;sl = new JSlider(SwingConstants.VERTICAL,0,255,0);

C. JSlider sl;sl = new JSlider(SwingConstant.VERTICAL,0,255,0);

D. JSlider sl;

sl = new JSlider(Swingconstant.VERTICAL,0,255,0);

Q.53) Common Methods of JScrollPanel class are:

-3 choices

A. public void setCorner(String key, component corner)

B. public void setHorizontalScrollBarPolicy(int

policy)

C. public void setVerticalScrollBarPolicy(int policy)

D. public void setHorizontalScrollBarPolicy(String key, policy)

E. public void actionPerformed(ActionEvent e)

Q.54) You are do not handle the events of the JScrollPane explicitly

A. true

B. false

Q.55) Which Statements are true?

A. A Swing Timer can fire only one ActionEvent

B. A Timer can be configured to fire events repeatedlly

Q.56) In JProgressBar class This method determines whether the string representation of the

numeric value is to be displayed or not

A. void setString(String s);

B. void setStringPainted(boolean b);

C. void setStringPaint(boolean)

Q.57) Which Statements are true?

- 2 choices

A. A porgress bar cannot comunicate progress of time as textual display of percentage

B. The setValue() method can be used to update the progress

C. The max value of the progress bar bay default is 100

D. The progressbar listens using ActionListener interface

E. The min value of the process bar by default is 10

Trang 10

Q.58) JColorChooser is added to the container using add() method of container

B. False

Q.59) Any character or number (Character.isLetter or Character.isDigit)

Q.60) which statements are true?- 2 choices

A. The button listens using ActionListener interface

B. The slider listens using ChangeListener interface

C. The progress bar listens using stateChanged(ChangeEvent e) method

D. The ScrollPanel listen using ActionListener interface

Q.61) The JFormattedTextField is similar to a JTextField in appearance.

B. False

Q.62) The Dialog box which block their parent when they pop up You have to finish the work

and close the dialog to return back to the parent

A. Modal

B. Non -

Modal

Q.63) Any character (Character.isLetter) All lowercase letters are mapped to upper case in

MaskFormatter class

Q.64) Which statements are true?- 3 choice

A. A JDialog is a top-level container

B. The container is physically constrained with the max size offered by the screen on which it display

C. To return the parent, it is required to close the modal dialog

D. if you click on the parent of the modal dialog box, it

appears

Q.65) Which statement are true?- 2 choices

A. It is not possible to use the String class to convert standard encoding systems to and from the Unicode system

Trang 11

B. Unicode is a 32 bit character encoding system.

C. Unicode provides a unique number for every character irrespective of platform, program or language

D. The java platform does not use Unicode as its native character encoding

E. The primitive data type in java is base on Unicode encoding

Q.66) This class is used to display a group of items.It allows you to choose one or more items., Items can be displayed in one or more columns

B. JList

C. JTextare

Q.67) This is a Java object associated with a container which governs the placement and size of the component

A. GridLayout

B. BorderLayout

C. Layout Manager

D. CardLayout

E. FlowLayout

Q.68)

This method help us retrieve locale-specific information from a given properties file and takes two arguments,a String and an Object

- 2 choices

A. Locale(languecode,CountryCode);

B. ResourceBundle

C. getBundle(String,Locale);

Q.69) The Method which invokes the getPreferredSize() method of the frame to determine the best size for laying out the components

A. setSize(int,int);

B. pack();

C. setVisible(boolean);

Q.70) The Type of Layout Manager which arranges the components from left to right.

A. FlowLayout Manager

B. BorderLayout Manager

C. CardLayout Manager

D. GridLayout Manager

Q.71) This allows to position components in only five possible location in container east, west,

north, south and center

A. FlowLayout

B. BorderLayout

C. GridLayout

D. CardLayout

Q.72) This class is used to represent a menu on a menu bar.

B. JMenu

C. JMenuItem

Ngày đăng: 07/05/2014, 17:22

Xem thêm

TỪ KHÓA LIÊN QUAN

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN

w