Professional Documents
Culture Documents
net
Answer: c
2. If you will view the JavaScript page, which machine will execute the so-
called script?
Answer: a
a) Livewire
b) Native
c) Microsoft
Answer: a
4. What variables are being used in the programs for the JavaScript?
Answer: a
www.javaassignmenthelp.net
a) Server-side
b) Native
c) Client-side
Answer: c
a) The <script>
b) The </script>
c) End statement
Answer: b
Answer: a
a) Accept parameters
b) Return the value and accept parameters
c) Return the value
Answer: a
www.javaassignmenthelp.net
Answer: c
a) <SCRIPT>
b) <TITLE>
c) <HEAD>
Answer: a
Answer: a
a) LANGUAGE
b) VERSION
www.javaassignmenthelp.net
c) SCRIPT
Answer: a
Answer: c
Answer: c
a) <js>
b) <scripting>
c) <script>
Answer: c
16.What correct syntax referring to the external script called " abc.js"?
Answer: b
Answer: c
a) navigator.appCodeName
b) navigator.appVersion
c) navigator.appName
Answer: a
Answer: a
www.javaassignmenthelp.net
Answer: a
21. If para1 is DOM object for a paragraph, then what is the correct syntax
in changing text within the paragraph?
a) para1.value="New Text";
b) "New Text"?
c) para1.nodeValue="New Text";
Answer: a
22.JavaScript entities begin with the _______ and end with the _________.
a) Semicolon, colon
b) Ampersand, colon
c) Ampersand, semicolon
Answer: c
Answer: b
www.javaassignmenthelp.net
a) File
b) Date
c) FileUpLoad
Answer: a
a) Database
b) Client
c) FileUpLoad
Answer: c
a) New
b) Delete
c) This
Answer: c
a) Eval
b) Efloat
www.javaassignmenthelp.net
c) ParseFloat
Answer: a
28.Event fires when form element loses the focus: <button>, <input>,
<label>, <select>, <textarea>?
a) Onfocus
b) Onblur
c) Onclick
Answer: b
a) [objectName.]eval(numeriC.
b) [objectName.]eval(string)
c) [EvalName.]eval(string)
Answer: b
a) Server
b) Client
c) Object
Answer: b
www.javaassignmenthelp.net
a) Select
b) For
c) Switch
Answer: c
Answer: b
a) dateObjectName Date([parameters])
b) dateObjectName = new Date([parameters])
c) dateObjectName := new Date([parameters])
Answer: b
34._______ method of the Array object adds and/or removes elements from
the array.
a) Reverse
b) Splice
c) Slice
Answer: b
www.javaassignmenthelp.net
a) window.captureEvents(Event.CLICK);
b) window.handleEvents (Event.CLICK);
c) window.routeEvents(Event.CLICK );
Answer: a
a) <A>
b) <BR>
Answer: a
a) Pathname
b) Host
c) Defaultstatus
Answer: c
38.In enabling data tainting, end user sets ____ environment variable.
a) ENABLE_TAINT
b) NS_ENABLE_TAINT
c) ENABLE_TAINT_NS
Answer: b
www.javaassignmenthelp.net
a) a form
b) a wrapper
c) a cursor
Answer: b
40.When the JavaScript object is being sent to the Java, the runtime engine
will create a Java wrapper of what type?
a) ScriptObject
b) JavaObject
c) JSObject
Answer: c
a) ScriptObject
b) JSObject
c) Jobject
Answer: b
www.javaassignmenthelp.net
a) JavaPackage
b) JavaArray
c) JavaObject
Answer: b
a) JavaClass
b) JavaPackage
c) JavaObject
Answer: a
a) netscape.javascript.JSObject
b) netscape.plugin.JSException
c) netscape.javascript.JSException
Answer: c
Answer: c
46.In order to open the dialog box every time a mistake occurs, which is
added to prefs.js?
a) user_pref("javascript.classic.error_alerts", true);
b) user_pref("javascript.console.open_on_error ", false);
c) user_pref("javascript.classic.error_alerts ", false);
Answer: a
a) Blur(value)
b) Blur()
c) Blur(depth)
Answer: b
a) captureEvents()
b) captureEvents(args eventType)
c) captureEvents(eventType)
Answer: c
www.javaassignmenthelp.net
a) Close(doC.
b) Close(object)
c) Close()
Answer: c
50.<script type="text/javascript">
x=4+"4";
document.write(x);
</script>
the output is ?
a) 4
b) 8
c) 44
Answer: c
a) True
b) False
Answer: a
www.javaassignmenthelp.net
52.<script>
document.write(navigator.appCodeName);
</script>
Answer: a
Answer: a
Answer: b
a) Database
b) Cursor
c) FileUpLoad
Answer: c
www.javaassignmenthelp.net
Answer: a
a) False
b) True
Answer: a
58.<script language="javascript">
function x()
{
document.write(2+5+"8");
}
</script>
a) 258
b) Error
c) 7
d) 78
Answer: d
www.javaassignmenthelp.net
59.<script type="text/javascript">
var s = "9123456 or 80000?";
var pattern = /\d{4}/;
var output = s.match(pattern);
document.write(output);
</script>
a) 9123
b) 91234
c) 80000
Answer: a
60.Test and tags are not displayed directly on page are written in _____
section.
a) <html>
b) <head>
c) <title>
d) <body>
Answer: b
a) <hr>
b) <line>
c) <line direction=”horizontal”>
d) <tr>
Answer: a
www.javaassignmenthelp.net
a) <head>
b) <title>
c) <html>
d) <document>
Answer: c
b) Application, drivers
d) drivers, application
Answer: c
Answer: d
www.javaassignmenthelp.net
65. ______are not machine instructions and the Java interpreter generate
machine codes that is directly executed by machine running the Java
program.
a) Compiled Instructions
b) Compiled code
c) byte code
d) Java mid code
Answer: c
a) Float
b) Byte
c) Character
d) Long double
Answer: d
www.javaassignmenthelp.net
a) java
b) run
c) javac
d) javaw
Answer: a
69.Java Servlet?
a) anonymous classes
b) nested classes
c) sub classes
www.javaassignmenthelp.net
d) derived classes
Answer: b
a) Executable
b) simple
c) high level
d) parameterized
Answer: d
74. In JDBC, ____ imports all Java classes that is concerned with the
database connectivity.
a)javax.sql.*
b)java.mysql.*
c)java.sql.*
d) com.*
Answer: c
a) .DAT
b) .MDB
c) .MSSQL
d) .OBJ
Answer: a
76. Ingres is a?
a) Socket
b) Compiler
c) Database
www.javaassignmenthelp.net
d) Web server
Answer: c
a) 1
b) 2
c) 0
d) multiple
Answer: a
b) class, RemoteException
c) class, RemoteInterface
d) all methods, RemoteInterface
Answer: c
a) Serialization, persistence
b) Persistence, inheritance
c) Inheritance, object
d) Persistence, serialization
Answer: a
a) Servlet, HTML
b) HTML, Java
c) HTML, Servlet
d) Java, HTML
Answer: d
a) ArithmeticException
b) Throwable
c) Class
d) Exception
Answer: b
85. In the java program, the package declaration ____ import statements.
a) must precede
b) must succeed
c) may precede or succeed
d) none
Answer: a
a) java.awt
b) java.lang
c) java.applet
d) java.string
Answer: d
87. ______package is being used by the compiler itself. So, it doesn’t need to
be imported for use.
a) java.math
b) java.awt
www.javaassignmenthelp.net
c) java.applet
d) java.lang
Answer: d
a) a-3, b-2,c-1
b) a-3, b-2, c-4, d-1
c) a-1, b-2, c-3, d-4
d) a-2, b-1, c-3, d-4
www.javaassignmenthelp.net
Answer: b
93. The ____and the ____classes are abstract classes supporting reading
and writing of the byte streams.
a) reader, writer
b) inputstream, outputstream
c) objectinputstream, objectoutputstream
d) none
Answer: b
class Test
{
abstract void display( );
}
www.javaassignmenthelp.net
a) No error
b) Method display( ) should be declared as static
c) Test class should be declared as abstract
d) Test class should be declared as public
Answer: c
a) classes
b) interfaces
c) editing tools
d) classes and interfaces
Answer: d
a) length( )
b) compare To ( )
c) equals ( )
d) All of them
Answer: d
byte x=64, y;
y= (byte) (x<<2);
System.out.println(y);
a) 0
b) 1
c) 2
d) 64
Answer: a
www.javaassignmenthelp.net
98. If m and the n are int type variables, what is result of the expression
m%n
when m=5 and n=2 ?
a) 0
b) 1
c) 2
d) None of the above
Answer: b
a) An integer expression
b) A Boolean expression
c) Either A or B
d) Neither A nor B
Answer: b
There you have java multiple choice interview questions that you may want to
practice with so that you can study and learn of Java. If you need Java
assignment help, feel free to contact us!