All Matches
Solution Library
Expert Answer
Textbooks
Search Textbook questions, tutors and Books
Oops, something went wrong!
Change your search query and then try again
Toggle navigation
FREE Trial
S
Books
FREE
Tutors
Study Help
Expert Questions
Accounting
General Management
Mathematics
Finance
Organizational Behaviour
Law
Physics
Operating System
Management Leadership
Sociology
Programming
Marketing
Database
Computer Network
Economics
Textbooks Solutions
Accounting
Managerial Accounting
Management Leadership
Cost Accounting
Statistics
Business Law
Corporate Finance
Finance
Economics
Auditing
Hire a Tutor
AI Study Help
New
Search
Search
Sign In
Register
study help
computer science
advanced java programming
Questions and Answers of
Advanced Java Programming
Which of these classes can be used to implement input stream that uses a character array as the source?(a) BufferedReader(b) FileReader(c) CharArrayReader(d) FileArrayReader
Which of these interfaces extends DataOutput interface?(a) Serializable(b) Externalization(c) ObjectOutput(d) ObjectInput
Which of these is the method for testing whether the specified element is a file or a directory?(a) IsFile()(b) isFile()(c) Isfile()(d) isfile()
Which of the following is a process of writing the state of an object to a byte stream?(a) Serialization(b) Externalization(c) File Filtering(d) All of the mentioned
Which of the following processes occur automatically by java run time system?(a) Serialization(b) Garbage collection(c) File Filtering(d) All of the mentioned
Which of these classes can return more than one character to be returned to input stream?(a) BufferedReader(b) Bufferedwriter(c) PushbachReader(d) CharArrayReader
DataInput is(a) An interface that defines methods to read primitive data types.(b) An abstract class defined in java.io.(c) A class we can use to read primitive data types.(d) An interface that
Which are the valid ways to create DataInputStream streams?(a) New DataInputStream(new FileInputStream(“in.dat”);(b) New DataInputStream(“in.dat”, “r”);(c) New
Given that the file is a File object, which of the following are legal statements to create a new file?(i) file.create();(ii) FileOutputStream fos = new FileOutput Stream(file);(iii) FileWrter out =
Which exception is thrown by the read() method of InputStream class?(a) Exception(b) IOException(c) FileNotFoundException(d) ReadException
Which of the following statements are true?(i) Unicode characters are all 16 bits.(ii) UTF characters are all 24 bits.(iii) Reader class has methods that can read integers and floats.(iv) File class
How do you convert byte array to inputstream?
How do you convert inputstream to reader or BufferedReader?
The file datafile begins with a single long value that tells you the offset of a single int piece of data within the same file. Write a program that gets the int piece of data. What is the int data?
What class and method would you use to read a few pieces of data that are at known positions near the end of a large file? How do you convert byte array to reader or BufferedReader?
How do you set file permissions in Java?
How do you read a file using BufferedInputStream?
What method(s) would you use to determine whether a file is a symbolic link?
How do you create temporary file in Java?
Write a program to write or store data into temporary file in Java?
How do you delete temporary files in Java?
How do you write string content to a file in Java?
Write a program to write byte content to a file in Java?
Which of these packages contains classes and interfaces for networking?(a) java.util.net(b) java.util(c) java.net(d) java.network
How many bits are present in a single IP address?(a) 8(b) 16(c) 32(d) 64
Which of these classes is used to encapsulate IP address and DNS?(a) ContentHandler(b) URL(c) InetAddress(d) DatagramPacket
What is the full form of URL?(a) Uniform Reverse Location(b) Uniform Resource Locator(c) Universal Resource Locator(d) Universal Resource Latch
Which of these exceptions is thrown by URL class’s constructors?(a) URLNotFoundException(b) URLSourceNotFound(c) MalformedURLException(d) URLNotFound
Which of these transfer protocols must be used so that a URL can be accessed by URLConnection class object?(a) http(b) https(c) Any Protocol can be used(d) None of the mentioned
Which of these data members of HttpResponse class is used to store the response from an http server?(a) status(b) address(c) statusResponse(d) statusCode
Which of these methods is used to know when the last URL was modified?(a) LastModified()(b) getLastModified()(c) GetLastModified()(d) getlastModified()()
Which of these methods is used to know the type of content used in the URL?(a) ContentType()(b) contentType()(c) getContentType()(d) GetContentType()
Which of these classes is used to access actual bits or content information of a URL?(a) URL(b) URLDecoder(c) URLConnection(d) All of the mentioned
Which of these classes is used to encapsulate IP address and DNS?(a) DatagramPacket(b) URL(c) InetAddress(d) ContentHandler
Which of these methods is used to know the host of a URL?(a) host()(b) getHost()(c) GetHost()(d) gethost()
Which of these methods is used to know the full URL of a URL object?(a) fullHost()(b) getHost()(c) ExternalForm()(d) toExternalForm()
Which of the following classes is used to represent IPv4 addresses?(a) InetV4Address(b) InetAddress4(c) Inet4Address(d) IPv4Address
Which of the following classes is used to represent IPv6 addresses?(a) Inet6Address(b) InetV6Address(c) InetAddress6(d) IPv6Address
A network interface card is represented by(a) NetworkHardware(b) NetworkCard(c) InterfaceCard(d) NetworkInterface
Which of the following methods is used to get the port of a URL?(a) port()(b) getPort()(c) urlPort()(d) returnPort()
Which of the following methods is used to establish a connection to the server?(a) connection()(b) open()(c) makeConnection()(d) openConnection()
Which of the following classes is used for HTTP?(a) HttpURLConnection(b) HttpURL(c) HttpConnection(d) HTTP
A proxy in Java is represented by(a) Proxy(b) JavaProxy(c) HTTPProxy(d) GenericProxy
Java API doesn’t provide any constructors for InetAddress. How do you create an InetAddress instance?
How do you make a connection using URL?
When are MalformedURLException and UnknownHostException thrown?
How do you get the IP address of a machine from its hostname?
What is the difference between URL instance and URLConnection instance?
How do you find the hostname corresponding to an IP address?
How do you find the IP address of local machine?
How do you specify the timeouts in networking applications? What is a servlet?
Which of the following statements is used by the server to listen for a connection request from a client?(a) Socket s = serverSocket.listen();(b) Socket s = serverSocket.wait();(c) Socket s =
Which of the following is used by a client to establish a socket connection with the server?(a) Socket s = serverSocket.getSocket();(b) Socket s = serverSocket.accept();(c) Socket s = new
What happens when a server uses a port to bind an object, but the port is not available?(a) The object is bound successfully.(b) The server is blocked until the port is available.(c) The server
What happens when a client requests connection to a server that has not yet started?(a) The exception java.net.Connection-Exception occurs.(b) The client gets blocked until the server is
Which of the following is used to get an InetAddress object on a socket object skt.(a) skt.obtainInetAddress();(b) skt.retrieveInetAddress();(c) skt.InetAddress();(d) skt.getInetAddress();
Which of the following can be used for the host name to establish a socket connection with the server running on the same machine with the client?(a) "127.0.0.1"(b) InetAddress.getLocalHost()(c)
To obtain an InputStream on a socket skt, we use __________.(a) InputStream in = skt.obtainInputStream();(b) InputStream in = skt.getInputStream();(c) InputStream in =
What is the full form of IPC?(a) Inter-Process Computing(b) Inter-Process Communication(c) Internal-Process Communications(d) Integrated-Process Computing
In which layer do socket applications belong?(a) Application Layer(b) Transport Layer(c) Network Layer(d) None of the above
How many bits are there in a socket address(a) 8(b) 16(c) 32(d) 48
Which of the following address pairs is known as socket address?(a) MAC address, port(b) IP address, port(c) IP address, MAC address(d) Source IP address, destination IP address
Which of the following ranges do reserved ports belong to?(a) 0 to 65535(b) -1023 to 1023(c) 0 to 256(d) 0 to1023
Which of the following classes is used to create TCP server socket?(a) ServerSocket(b) Socket(c) DatagramSocket(d) MulticastSocket
Which of the following methods is used to listen to incoming connections?(a) accept()(b) listen()(c) receive()(d) get()
Which of the following methods is used to receive a datagram?(a) accept()(b) get()(c) receive()(d) store()
Which of the following methods is used to assign a socket address to a socket?(a) assign()(b) attach()(c) bound()(d) bind()
An object is said to be serializable if its class implements(a) Serializable interface(b) DoSerialize interface(c) DoExternalize interface(d) Convertible interface
What is the full form of TCP?(a) Transmission Control Packet(b) Transport Control Protocol(c) Transfer Control Protocol(d) Transmission Control Protocol
What is the full form of UDP?(a) Useful Datagram Protocol(b) Useful Datagram Packet(c) User Datagram Protocol(d) User Datagram Packet
Which of the following IP address classes do multicasting addresses belong to?(a) Class A(b) Class B(c) Class C(d) Class D
What is meant by port? Why is it used?
Which are reserved ports? Why are they kept reserved?
Briefly explain the term socket address.
Write the names of Java socket classes used to develop TCP socket applications.
Write the basic steps to develop TCP socket applications
What is meant by binding a socket to a socket address. Why is it necessary?
How do you develop a server application that can handle multiple client requests concurrently?
Compare and contrast TCP and UDP sockets.
What is a ServerSocket and how is it used?
Write the names of Java socket classes used to develop UDP socket applications.
Write the basic steps to develop UDP socket applications.
What are the differences between uni-casting and multicasting?
How does multicasting differ from broadcasting?
Give some examples where multicasting is used.
Mention some advantages and disadvantages of Java Sockets?
How do you get the IP address of a machine from its hostname?
What are the differences between a TCP socket and a UDP socket? How are they created in Java?
Write a Java socket program to get the resource http://www.google.com/index.html using HTTP protocol.
What is a serializable object? Give some examples of non-serializable objects in Java.
What is the default port number of RMI?(a) 1099(b) 1990(c) 1090(d) 1909
A remote object must be an instance of(a) java.rmi.RemoteObject(b) java.io.Serializable(c) java.lang.Cloneable(d) java.rmi.Remote
Which of the following is a utility that registers remote objects and provides naming services for locating objects?(a) rmiregistry(b) rmic(c) java(d) javac
Which of the following is an object that resides on the client host and serves as a proxy for the remote server object?(a) Stub(b) RMI Registry(c) Server implementation(d) Skeleton
___________ is an object that resides on the server host and communicates with the stub and the actual server object.(a) Server object interface(b) RMI Registry(c) Skeleton(d) Stub
Which of the following command is used in Java RMI to start the object registry on port 1080?(a) Rmiregistry 1080(b) Rmiregistry(c) Objectregistry 1080(d) Objectregistry
Which of the following is used to register a remote object o with a name obj at port 1080 on host it.jusl.ac.in?(a) Naming.bind(“rmi://it.jusl.ac.in/obj”,
____________ is a sub interface of java.rmi.Remote that defines the methods for the server object.(a) Skeleton(b) Server object interface(c) Server implementation(d) RMI Registry
To locate a remote object with the name obj at port 1080 on host it.jusl.ac.in, we use(a) Remote remoteRef = Name.lookup("rmi://it.jusl.ac.in:1080/obj");(b) Remote remoteRef =
Which of the following methods is used to export an object?(a) exportObject()(b) export()(c) doExport()(d) exportIt()
Showing 1 - 100
of 1226
1
2
3
4
5
6
7
8
9
10
11
12
13