Board Multiple Choice Questions
Board Multiple Choice Questions
(A) TM, MT and © (B) TM, MS and ® (C) TM, SM and ® (D) TM, SM and (C)
(21) Which of the following is the process of hiding information within other information ?
(A) Squatting (B) Steganography (C) Name changing (D) Copyright
(22) Which of the following is a digital code inserted into a digital image, audio or video file which can identify the
file’s copyright information ?
(A) Image mark (B) Digital mark (C) Code mark (D) Water mark
(23) Who issues the credit card and guarantees the payment to the merchant ?
(A) Merchant (B) Issuing bank (C) Acquiring bank (D) Customer
(24) Which of the following payment card has a microchip embedded in its surface ?
(A) Smart card (B) Debit card (C) Credit card (D) Charge card
(25) Which of the following service is included in mobile information services ?
(A) News services (B) Financial records (C) Stock market data (D) All of these
(26) Which of the following is the most accurate in determining a mobile device’s position ?
(A) GSP (B) GPS (C) GAP (D) GEP
(27) Which of the following location based application is used for plotting route from one place to another ?
(A) Tracking services (B) Mapping (C) Navigation (D) Information and Directory services
(28) There are how many important aspects for the E-Commerce/M-Commerce security ?
(A) 2 (B) 3 (C) 4 (D) 5
(29) Which security aspect of E-Commerce/M-Commerce ensures that the information must not be accidentally or
maliciously altered or tempered in transit ?
(A) Confidentiality (B) Integrity (C) Authorization (D) All of these
(30) Which of the following is a security measure on Internet ?
(A) Antivirus software (B) Firewall (C) Cryptography (D) All of these
(31) Which of the following symbol is used for trademark ?
(A) TM (B) SM (C) ® (D) All of these
(32) Which of the following entity pay role in online payment ?
(A) Payment gateway (B) Payment Processor (C) Both (A) and (B) (D) None of these
(33) While making payment through which the customer is not required to provide the credit/debit card number ?
(A) Credit card (B) Debit card (C) E-Wallet (D) ETF
(34) Which of the following launched a new card payment mechanism RuPay ?
(A) NPCI (B) NICP (C) NCPI (D) NRCP
(35) Which of he following is an attack used to shutdown a machine or network, making it inaccessible to its
intended users ?
(A) Malicious code (B) Denial of service attack (C) Spoofing (D) Cyber vandalism
(36) Which of the following protocol is used to securing web transactions on the Internet?
(A) TCP/IP (B) HTTP (C) SSL (D) FTP
(37) In M-Commerce, which of the following starting address indicates that site is secured by SSL protocol ?
(A) http:// (B) ssl:// (C) https:// (D) https-ssl://
(38) Which of the following is not a limitation of M-Commerce ?
(A) Limited computing power, memory, storage (B) Operates over wireless networks
(C) High cost of establishing (D) Contacted at virtually any where
(39) Which aspect in M-Commerce security ensure that the information must not be accidently or maliciously
alerted or tampered in transit ?
(A) Confidentiality (B) Integrity ( C) Authorization (D) Non-repudiation
(40) In which part is the online payment through credit card on internet divided ?
(A) Authorization (B) Settlement (C) Both (A) and (B) (D) Smart card
(41) In M-Commerce, who issues the credit card and guarantees the payment to the merchant?
(A) Merchant (B) Issuing bank (C) Acquiring bank (D) Customer
(42) What is called the most commonly used network protection barrier between the company’s network and the
outside world ?
(A) Firewall (B) Antivirus software (C) Digital certificate (D) Cryptography
(43) Which of the following is an example of M-Commerce application ?
(A) Mobile Marketing and Advertising (B) Mobile Ticketing (C) Mobile Entertainment (D) All of these
(44) Which of the following refers to the stock market services offered via mobile devices ?
(A) Mobile investment (B) M – share (C) M - transaction (D) Mobile brokerage
(45) Which of the following is not an example of location based services ?
(A) Tracking services (B) Navigation (C) Directory services (D) None of these
(46) Major credit card companies use which security system to make online transaction secure?
(A) SFTP (B) SET (C) SHTP (D) HTPS
(47) Which of the following is known as electronic defacing of an existing website page ?
(A) Malicious code (B) Denial-of-service (C) Spoofing (D) Cyber vandalism
(48) Which of the following is the network protection barrier most commonly used between the company’s network
and the outside world ?
(A) Cryptography (B) Antivirus (C) Digital Certificate (D) Firewall
(49) Which of the following is an art of protecting the information by transforming it into an unreadable form ?
(A) Hidden text (B) Decryption (C) Cryptography (D) Digital text
(50) Which of the following symbol is not used for trademark ?
(A) SM (B) TM (C) ® (D) C
(51) What is known as the process of hiding information within other information ?
(A) Watermarking (B) Steganography (C) Copyright (D) Cryptography
(52) The payment cards can be classified into which of the following type ?
(A) Credit card (B) Debit card (C) Smart card (D) All of these
(53) Which of the following entity pay role in online payment ?
(A) Payment gateway (B) Processor (C) Both (A) and (B) (D) Customer
(54) Which making payment through which the customer is not required to provide the credit/debit card number ?
(A) Debit card (B) E-wallet (C) Charge card (D) Smart card
(55) What refers to buying and selling by mobile phone ?
(A) M-Shop (B) M-Business (C) M-Commerce (D) Phone-Shop
(56) Which of the following security aspects of E-commerce/M-commerce ensures that the information must not be
accidentally or maliciously altered or tampered in transit ?
(A) Confidentiality (B) Integrity (C) Non-repudiation (D) Authorization
(57) From the following which is internet security threat in which there is electronic detaching of an existing web
page ?
(A) Malicious code (B) Sniffing (C) Cyber Vandalism (D) Denial of service attack
(58) What is an art of transformation of normal text known as “plain text” into unreadable or secret text known as
“Cipher text” ?
(A) Firewall (B) Encryption (C) Decryption (D) Digital certificate
(59) Who developed SSL protocol which is used to securing web transaction on the Internet ?
(A) Firefox (B) Yahoo (C) Netscape (D) Google
(60) Who provides the author with a tool to protect his/her original work from being used or taken by others
without permission ?
(A) Copyright (B) Trademark (C) Steganography (D) Digital Watermarking
(61) Who issues the credit card and guarantees the payment to the merchant ?
(A) Issuing bank (B) Acquiring bank (C) Both (A) and (B) (D) Master bank
(62) Which of the following card stores 100 times more information than the normal card ?
(A) Credit card (B) Debit card (C) Smart card (D) Charge card
(63) Which of the following is not a symbol for trademark ?
(A) TM (B) SM (C) PM (D) ®
(64) Which of the following is the process of hiding information with in other information ?
(A) Copyright (B) Steganography (C) Squatting (D) Cyber vandalism
(65) Which of the following means transferring money from one bank account to another electronically ?
(A) Electronic Fund Travelers (B) Electronic Fund Transaction
(C) Electronic Fund Tracer (D) Electronic Fund Transfer
(66) Which of the following protocol is used for securing web transactions on the internet ?
(A) SSA (B) SSP (C) SSL (D) SST
(67) Which of the following is the transaction of normal text known as “plain text” into unreadable or secret text
known as “cipher text” using encryption algorithm ?
(A) Encryption (B) Decryption (C) Digital Certificate (D) Firewall
(68) Which of the following is the transformation of encrypted text back into normal text ?
(A) Digital Certificate (B) Firewall (C) Encryption (D) Decryption
(69) Which of the following is the most accurate in determine a mobile device’s position ?
(A) GPS (B) GSP (C) GAP (D) GSA
(70) Which of the following software program detects & prevents and takes action to remove the malicious codes
from the infected system ?
(A) Anti worm (B) Anti Trojan (C) Anti virus (D) Anti nibble
(71) Which of the following has launched new card payment mechanism RuPay ?
(A) NPIC (B) NPCI (C) NPIA (D) NPCL
(72) Which of the following card is not required to provide the credit/debit card number while making payment ?
(A) D-Wallet (B) E-Wallet (C) L-Wallet (D) X-Wallet
(79) Stock market services offered via mobile devices are known as ?
(A) Mobile Banking (B) M-Banking (C) Mobile Brokerage (D) Mobile Transaction
(80) Which of the following is not an important security aspect of E-commerce/M-commerce security ?
(A) Confidentiality (B) Integrity (C) Authorization (D) Navigation
(81) Which of the following is a computer program that detects, prevents and takes action to remove the malicious
code from the infected system ?
(A) Digital Certificate (B) Cryptography (C) Antivirus software (D) Firewall
(82) Which of the following is not a symbol of trademark ?
(A) TM (B) SM (C) © (D) ®
(83) Which of the following is a new card payment mechanism launched by National Payment Corporation of India
(NPCI) ?
(A) Rupy (B) PayRupy (C) Rudeb (D) RuPay
(84) Which of the following is a digital code inserted into a digital image, audio or video file which can identify the
file’s copyright information ?
(A) Image Mark (B) Digital Mark (C) Code Mark (D) Water Mark
(85) From the following location based services, which service provides “tracking of assets locating friends in a
geographic location, tracking stolen cars” services ?
(A) Mapping (B) Emergency services (C) Tracking services (D) Navigation
(86) From the following who ensures that the information must not be accidentally or maliciously altered or
tampered in transit ?
(A) Non-repudiation (B) Authorization (C) Integrity (D) Confidentiality
(87) In which internet security threat, electronic defacing of an existing website page found and an attacker replaces
the website’s original content with his/her own content ?
(A) Denial of service attack (B) Cyber vandalism (C) Spoofing (D) Sniffing
(88) Trademark is designated by which symbol ?
(A) ® (B) SM (C) TD (D) Both (A) and (B)
(89) From the following which bank issues the credit card and guarantees the payment to the merchant ?
(A) Acquiring bank (B) Issuing bank (C) PayPal (D) Both (A) and (B)
(90) Which of the following is a computer program that detects, prevents and takes action to remove the malicious
codes like viruses, worms and Trojan houses from the infected system ?
(A) Antivirus software (B) Encryption (C) Cryptography (D) Digital certificate
Textbook Exercise
(1) How many basic (primitive) data types are supported in Java ?
(A) 2 (B) 4 (C) 8 (D) 16
(2) What is the default data type of floating point literal ?
(A) int (B) long (C) float (D) double
(3) Which character set is used for char data type in Java ?
(A) Unicode (B) ASCII (C) EBCIDIC (D) All of these
(4) Which of the following is compiled error free ?
(A) for (;;) {int i=7} (B) while (1) {int i=7} (C) while (True) {int i = 7} (D) All of these
(5) Which of the following is not allowed as first character in valid variable name ?
(A) Underscore (_) (B) Digit (C) Letter (D) Dollar ($)
(6) Which of the following is not a basic data type in Java ?
(A) char (B) long (C) byte (D) string
(7) What is the default value of boolean type data ?
(A) null (B) true (C) false (D) 0
(8) What will be the result of arithmetic expression 7/2 ?
(A) 3 (B) 3.5 (C) 1 (D) 0
(9) What will be the result of arithmetic expression –7%2 ?
(A) –3 (B) –1 (C) 1 (D) –3.5
(10) What will be the result of arithmetic expression –7.5%2 ?
(A) –3 (B) –1.5 (C) 1.5 (D) Error
(11) What sign is used for creating API documentation form the code ?
(A) // (B) /* ..... */ (C) /** ..... */ (D) \\
(12) In Java, which of the following looping is exist controlled ?
(A) for (B) while (C) do.....while (D) if.....then.....else
(13) In Java, which of the following is not allowed as first character in valid variable name ?
(A) _ (Underscore) (B) Digit (C) Letter (D) $ (Dollar)
(14) What is known as when program written in Java are compiled in to machine language for a computer ?
(A) Java Visible Machine (B) Java Virtual Machine (C) Java View Modifier (D) Java Visible Modifier
(15) What is known as post decrement in Java when operator is used after variable name ?
(A) ++ (B) – – (C) == (D) =<
(16) By using which extension file java interpreter byte code executes ?
(A) .java (B) .class (C) .txt (D) .html
(17) In Java, which statement is used when there are many alternative actions to be taken depending upon
the value of a variable or expression ?
(A) Switch (B) Nested if (C) Control (D) Repeat
(18) What kind of the primitive data types are provided in Java from the following ?
(A) boolean (B) double (C) char (D) All of these
(19) What is the value of float data type in Java ?
(A) Integer (B) Real (C) Character (D) Boolean
(20) In Java what will be the result of arithmetic expression –7.5%2 ?
(A) –3 (B) –1.5 (C) 1.5 (D) Error
(21) Java language is developed by which company ?
(A) Sun Microsystem (B) Sun Java System (C) Sun system (D) Sun Microsoft
(22) The machine language for the Java Virtual Machine is called what ?
(A) Code Byte (B) Type code (C) Java Bytecode (D) Java code
(23) While creating Java what must be the same ?
(A) folder name, file name (B) class name, extension
(C) class name, folder name (D) class name, file name
(24) When the program gets compiled without error, compiler creates a file with which extension ?
(A) .comp (B) .txt (C) .java (D) .class
(25) The process of compiling and executing a Java application is as follows. What is missing
from given chart ?
Java source file (.java) Java compiler (javac) ? JVM – Java Interpreter (java)
(A) Java class (*.exe) (B) Java textcode (*.txt) (C) Java Bytecode (*.class) (D) Java typecode (*.obj)
(26) Which of the following is right way to define variable ?
(A) $age (B) discount rate (C) 4youpeople (D) %discount
(27) String literals is a sequence of characters enclosed in which quotes ?
(A) ‘ ’ (B) “ ” (C) ( ) (D) { }
(28) Which of the two symbols are used in the conditional operator in Java ?
(A) : and * (B) # and ? (C) ? and : (D) / and ?
(29) While using shorthand version of assignment, if it is defined as a+ =b, where a is 7 and b is 8, then what
will result of a ?
(A) 8 (B) 49 (C) 14 (D) 15
(30) When two operators are having different priority, then an operator with higher precedence is
operated .....
(A) first (B) last (C) second (D) middle
(31) What will be output of following program ?
class abc
{
public static void main (String [] s)
{
for (int i=0; i<10; i++)
{
SYSTEM.out.println(i);
}
}
}
(A) Error (B) I (C) Display 1 to 10 (D) 1, 2, 3, ..... 10
(32) Control structure branches are used to choose among two or more possible courses of action, is called
as what ?
(A) More structure (B) Loop structure (C) Addition structure (D) Selective structure
(33) Switch statement can be stopped using which statement ?
(A) break (B) run (C) loop (D) error
(34) do..... while loop is which type of loop ?
(A) Loop controlled (B) Break controlled (C) Exit controlled (D) Entry controlled
(35) To use a labelled loop, which symbol is added before the loop ?
(A) * (B) $ (C) : (D) #
(36) In Java, the text written in /* ..... */ is considered as what ?
(A) Method (B) Comment (C) Function (D) Variable
(37) User can create Java source file by using ..... application.
(A) SciTE editor (B) ASCII text editor (C) Both (A) and (B) (D) None of these
(38) The definition of the method (function) in Java consists of function header and the
sequence of statement enclosed in which bracket ?
(A) { } (B) < > (C) ( ) (D) [ ]
(39) Java supports how many primitive data types ?
(A) 3 (B) 8 (C) 4 (D) 7
(40) Which of the following data type is used for real numbers ?
(A) short (B) char (C) long (D) double
(41) From the following which is considered as one of the ideal language for distributing executable program
and also general purpose programming language for developing programs that are easily usable and
portable across different platforms?
(A) C language (B) Java (C) Visual Basic (D) JavaScript
(42) Which extension is used to source file of Java language, written in a text editor ?
(A) .class (B) .html (C) .jpg (D) .java
(43) From the following which methods are used to display results ?
(A) System.out.print() (B) System.out.println() (C) Both (A) and (B) (D) System.print.display()
(44) In Java, the program is compiled without any error, which command is used to execute it?
(A) Tools Go (B) Tools Run (C) Tools Build (D) Tools Compile
(45) How many primitive data types are there in Java ?
(A) 5 (B) 6 (C) 7 (D) 8
(46) From the following which are the examples of reserved words in Java ?
(A) class (B) public (C) static (D) All of these
(47) A name used for a constant value is known as what in Java ?
(A) String (B) Array (C) Literal (D) Class
(48) Which sign is used to insert single line comment in Java ?
(A) /* and */ (B) /** and */ (C) // (D) #
(49) From the following which is not logical operator in Java ?
(A) AND (B) OR (C) NOT (D) Equal to
(50) From the following which is true syntax of conditional operator ?
(A) <exp>=<exp1>=<exp2> (B) <exp>?<exp1>:<exp2>
(C) <exp>;<exp1>?<exp2> (D) <exp>=<exp1>:<exp2>
(51) In Java, at which level platform – independence is possible due to bytecode interpreter ?
(A) Browser (B) Source (C) Machine (D) Binary
(52) In Java, the machine language for Java Virtual Machine is known as which code ?
(A) Java filecode (B) Java bytecode (C) Java intcode (D) Java sourcecode
(53) To compile the java program we have to type what in front of source file name ?
(A) javac filename.java (B) javac filename
(C) javac filename.html (D) javac filename.java
(54) If Java program is compiled without any error we can execute it in SciTE editor by which menu- option?
(A) Compile Run Go (B) Edit Go (C) Tools Go (D) File Go
(55) Java supports how many primitive data types ?
(A) 2 (B) 4 (C) 6 (D) 8
(56) What is the storage space for datatype float in Java ?
(A) 1 byte (B) 2 byte (C) 4 byte (D) 8 byte
(57) Real numbers in Java are compliant with which of the following ?
(A) IEE 36 (B) IEE 16 (C) IEEE 780 (D) IEEE 754
(58) In Java, variable name should begin with which of the following ?
(A) Alphabet (B) Underscore (_) (C) Dollar sign ($) (D) All of these
(59) In Java, a name used for constant value is known as what ?
(A) String return (B) Literal (C) Unicode Quote (D) ASCII
(60) Java 7 also supports binary numbers, using digits 0 and 1 but it should be prefix by which of the
following ?
(A) 0b or 0B (B) B (C) B1 (D) B0
(61) In Java, for type boolean there are precisely two literals, which are they ?
(A) Y and N (B) 0 and 1 (C) True and False (D) Yes and No
(62) In Java, characters are stored by how many bit Unicode characters ?
(A) 4 - bit (B) 8 – bit (C) 16 - bit (D) 32 - bit
(63) String literals in Java is a sequence of characters which can be enclosed in which of the following ?
(A) $ ..... $ (B) “ ” (C) ` ` (D) ‘ ’
(64) In Java, documentation comments begins and ends with which of the following ?
(A) /** ..... */ (B) /* ..... */ (C) /* ..... / (D) //
(65) Arithmetic operators in Java, can be applied on which numeric data ?
(A) short (B) float (C) byte (D) All of these
(66) In Java, which of the following is known as unary operators for increment and decrement operators ?
(A) >== and <= (B) + and – (C) == and != (D) + + and - -
(67) Which of the following is considered as comparison operator in Java ?
(A) = (B) / (C) % (D) !=
(68) In Java, logical operators are also called which of the following operators if they operate
on Boolean operands ?
(A) Assignment operator (B) Boolean operator
(C) Increment operator (D) Relational operator
(69) In Java, conditional uses which two symbols in expression to delimit three operands ?
(A) ? and * (B) . and : (C) ? and : (D) : and ;
(70) In Java, a block statement is a group of statements enclosed between which pair of braces ?
(A) [/ ..... /] (B) { } (C) ( ) (D) [ ]
(71) Java language was developed by whom ?
(A) Sun Microsystems (B) Oracle (C) Netscape (D) Microsoft
(72) When Java program created Java source file using text editor, which file extension should be given ?
(A) .class (B) .html (C) .obj (D) .java
(73) What is the full form of JVM ?
(A) Java Visibility Machine (B) Java Visual Machine (C) Java Virtual Machine (D) Java Vocal Machine
(74) Which menu – option is used to compile source program in SciTE ?
(A) Edit Compile (B) Format Compile (C) Tools Compile (D) File Compile
(75) What is he default value of Boolean data type of Java ?
(A) False (B) True (C) 0 (D) 1
(76) From the following which is the illegal name of variable in Java ?
(A) 4me (B) result (C) amount$ (D) prise$
(77) The name used for a constant value is known as what in Java ?
(A) String (B) Array (C) Literal (D) Class
(78) Which sign indicates single line comment in Java ?
(A) /* ..... */ (B) /** ..... */ (C) // (D) #
(79) From the following which is not a comparison operator in Java ?
(A) > (B) < (C) >= (D) +
(80) Which operator can be used to concatenate a string in Java ?
(A) = (B) + (C) & (D) *
(81) Most of the Java syntax is very similar to which language ?
(A) Fortran (B) SQL (C) C (D) FoxPro
(82) At which level platform – independence is possible due to bytecode interpreter ?
(A) Bottom level (B) Binary level (C) Source level (D) High level
(83) The alphabet D in JDK stands for which of the following ?
(A) Department (B) Development (C) Design (D) Desktop
(84) Which of the following company is best known for its high-end Unix workstations ?
(A) Sun Microsoft (B) Sun Microchip (C) Sun Microsystems (D) Sun Microsource
(85) Programs written in Java are compiled into machine language for a computer that doesn’t really exists.
This type of computer is known as what ?
(A) Java Virtual Model (B) Java Verifier Machine (C) Java Vertical Machine (D) Java Virtual Machine
(86) The only disadvantage of using bytecode is which of the following ?
(A) High execution speed (B) Fast execution speed
(C) Slow execution speed (D) Random execution speed
(87) In Java, Java source files name and class they define name should be what ?
(A) Totally different (B) Same (C) Different (D) Vice Versa
(88) What is the extension of Java Source file?
(A) .j (B) .java (C) .class (D) .jav
(89) Which of the following way user can run “abc.java” source program through the application using Java
interpreter ?
(A) java ABC (B) java abc.obj (C) java abc.class (D) java abc
(90) In Java, the text written in which of the following are comments ?
(A) \* ..... *\ (B) /* ..... */ (C) /* ..... *\ (D) \* ..... */
(91) Which of the following editor is used to create Java source program in Ubuntu ?
(A) Jedit (B) Notebook (C) WordPad (D) SciTE
(92) Java consists of function header and the sequence of statements enclosed between which braces ?
(A) < > (B) [ ] (C) { } (D) ( )
(93) Java supports how many primitive data type ?
(A) 6 (B) 7 (C) 8 (D) 9
(94) Which of the following data type hold real numbers ?
(A) long (B) double (C) char (D) byte
(95) A name used to refer to the data stored in memory is called what ?
(A) Value (B) Object (C) Variable (D) Function
(96) Which of the following is illegal way to define variable name in Java ?
(A) $Price (B) %Sale (C) B4U (D) Amount$
(97) Which of the following is not a reserved word in Java ?
(A) class (B) else (C) static (D) rate
(98) Control structures in Java is divided in two types : Loops and what ?
(A) Message (B) Function (C) Branches (D) Alerts
(99) In Java, which statement is used to exit from the loop structure ?
(A) Stop (B) Exit (C) Out (D) Break
(100) Which of the following is exit – controlled loop in Java ?
(A) for (B) do ..... while (C) while (D) loop
(101) When the program gets compiled without errors, compiler created which type of file extension in
Java ?
(A) .class (B) .java (C) .c++ (D) .c
(102) From the following which is not compiled or interpreted in Java ?
(A) if statement (B) Function (C) Comment (D) Varibale
(103) Which command is used if the program is compiled without any error ?
(A) Tools Execute (B) Edit Go (C) Tools Go (D) Tools Compile
(104) In Java, boolean data type hold which logical values ?
(A) Y, N (B) 0, 1 (C) True, False (D) Yes, No
(105) From the following which legal name of variable ?
(A) birth date (B) birth_date (C) %discount (D) 4balance
(106) Which numeric digits are used for Hexadecimal numbers (16 digits) in integer literals in Java ?
(A) 0 to 8 and A to F (B) 0 to 9 and A to F (C) 0 to 15 (D) 0 to 16
(107) What is the symbol for multi-line comment in Java program ?
(A) /* and */ (B) //* and *// (C) * and * (D) //
(108) In Java, what will be the result of arithmetic expression 8 % 3 ?
(A) 8 (B) 3 (C) 4 (D) 2
(109) Which sign is used for “A not equal to B” in comparison operator of Java ?
(A) A ≠ B (B) A != B (C) A not equal B (D) A == B
(110) Which of the following statement is true for Java Language ?
(i) Java language was developed by Sun Microsystem.
(ii) Java is an object-oriented language.
(iii) Java is not platform-independent at both the source and binary level.
(A) Only (i) and (ii) (B) Only (ii) and (iii) (C) Only (i) and (iii) (D) (i), (ii) and (iii)
(111) In Java, float data type takes how many bytes of storage space ?
(A) 2 bytes (B) 4 bytes (C) 8 bytes (D) 16 bytes
(112) In Java, variable name must begin with which of the following ?
(A) % (B) Digits (C) Space (D) Alphabet
(113) Which of the following statement is right for boolean literals in Java ?
(i) 0 is treated as false and 1 is treated as true.
(ii) Literals are to be typed without quotes.
(iii) For the boolean type, there are two literals : true and false
(A) Only (i) and (ii) (B) and (ii) and (iii) (C) Only (i) and (iii) (D) (i), (ii) and (iii)
(114) Which of the following is not a basic arithmetic operator of Java ?
(A) + (B) – (C) * (D) \
(115) Which of the following is not a comparison operator in Java ?
(A) <= (B) >= (C) = (D) !=
(116) How many types of control structures are there in Java ?
(A) One (B) Two (C) Three (D) Four
(117) In the switch statement of Java, the test expression should be of which of the following type ?
(A) float (B) double (C) byte (D) boolean
(118) In Java, which of the following loop is a exit-controlled or post-test loop construct ?
(A) for loop (B) while loop (C) do ... while loop (D) switch
(119) After execution of which statement in the loop of Java, all the following statements in a body of the
loop are skipped and no further iteration take place ?
(A) continue (B) go (C) break (D) loop
Chapter-8
Classes and Objects in Java
Text book Exercise
(1) Which of the following defines attributes and methods ?
(A) Class (B) Object (C) Instance (D) Variable
(2) Which of the following keyword is used to declare Class variables and class methods ?
(A) static (B) private (C) public (D) package
(3) Which of the following operator creates an object and returns its reference ?
(A) dot (.) (B) new (C) colon (:) (D) assignment (=)
(4) Which of the following method can be called without creating an instance of a class ?
(A) Instance method (B) Class method (C) Constructor method (D) All of these
(5) Which of the following refers more than one method having same name but different
parameters ?
(A) Overloaded methods (B) Overridden methods (C) Duplicate methods (D) All of these
(6) Which method is invoked automatically with creation of an object ?
(A) Instance method (B) Constructor (C) Class method (D) All of these
(7) Which of the following is the keyword used to refer a superclass constructor in subclass
constructor ?
(A) extends (B) super (C) name of the superclass (D) new
(8) Which of the following is used to invoke an instance method in Java ?
(A) The name of the object, colon (:) and the name of the method
(B) The name of the object, dot (.) and the name of the method
(C) The name of the class, colon (:) and the name of the method
(D) The name of the class, dot (.) and the name of the method
(9) Which of the following is accessible by instance methods ?
(A) Only instance variables (B) Only class variables (C) Both (A) and (B) (D) None of these
(10) When methods in the superclass and subclass have same name and signature, what are
they called ?
(A) Overloaded methods (B) Overridden methods (C) Inherited methods (D) All of these
Chapter-9
Working with Arrays
Textbook Exercise:
(1) Which of the following refer to the starting index value in arrays ?
(A) 0 (B) 1 (C) Null (D) All of these
(2) What is the size of second dimension in an array sales [5] [12] ?
(A) 5 (B) 12 (C) 60 (D) 10
(3) What will expression sales.length return for an array sales [5] [12] ?
(A) 5 (B) 12 (C) 60 (D) 120
(4) When an array sales [5] [12] is declared without specifying initial values, what is the initial value of sale [0]
[0] ?
(A) 0 (B) default value (C) compilation error (D) 60
(5) What does ‘length’ refer to for an object of String class ?
(A) attribute (B) method (C) class variable (D) class name
(6) If ‘str’ is the object of String class and its content is “Thank GOD”, then what is the value of str.length() ?
(A) 9 (B) 10 (C) 8 (D) 11
(7) What type of value is returned when we use get method of Calendar class with constant DAY_OF_WEEK as
an argument ?
(A) int (B) char (C) string (D) Boolean
(8) What is useful when same operations are to be performed on various elements of the similar type in Java
?
(A) Array (B) String (C) if.....then (D) while
(9) In Java which method is used to fill the whole or partial array with specified value ?
(A) fill (B) sort (C) set (D) insert
(10) To make a string object which of the following constructers is used to create a string object using 1-D ary
argument starting at ary [start] with len number of characters ?
(A) String (char ar[], int start, int len) (B) String (int start, int length)
(C) String (int length, int start) (D) String (char ary[], int len)
(11) Which of the methods of string class returns an array of characters as bytes from invoking string in Java ?
(A) int length() (B) byte [ ] get bytes [ ] (C) int bytes [ ] (D) get bytes [ ]
(12) What type of value is returned when we use get method of calendar class with constant DAY_OF_WEEK
as an argument in Java ?
(A) int (B) char (C) string (D) boolean
(13) In Java, by using which sign 1-D array is initialized to separate values of data elements in braces { } ?
(A) . (Full stop) (B) ; (Colon) (C) ; (Semi colon) (D) , (Comma)
(14) In Java, if ‘str’ is the object of string class and its content is ‘Thank God”, then what is the value of str.length()
?
(A) 9 (B) 10 (C) 8 (D) 11
(15) In Java, how can be array elements accessed using index for each dimension in ?
(A) [ ] (B) ( ) (C) { } (D) < >
(16) In Java by using which of the following methods of comparing string returns ‘>0’ integer if invoking string
is greater than ?
(A) boolean equals (string str) (B) boolean compare to (string str)
(C) int compare to (string str) (D) int compare to ignore (string str)
(17) In Java array what is the process of making an object used to manage list of items ?
(A) Declare an array object (B) Create an array object
(C) Both (A) and (B) (D) Define Object Method
(18) Java supports two types of strings that are handled by two classes. Which are they ?
(A) String, Buffer String (B) String, String Buffer
(C) String, String Literals (D) String, Buffer
(19) Which constructor can be used without arguments to create a string object with no character ?
(A) String ( ) (B) String { } (C) String < > (D) String [ ]
(20) Which of the following tasks are provided by string class ?
(A) Appending string. (B) Extracting part of string.
(C) Splitting string into sub string (D) All of these
(21) Which of the following method returns number of characters in invoking string ?
(A) int count() (B) int lencount() (C) int length() (D) int len()
(22) Which of the following method is used to return a string converted to lower case ?
(A) StringtoLowerCase() (B) StringToLower() (C) String() (D) StringLower()
(23) Which of the following method is used to return a string after appending ‘str’ with the invoking string ?
(A) String Append() (B) String concat (string str)
(C) String conAppend () (D) String Append (string)
(24) Which class encapsulate both date and time and represent the value using milli-seconds precision ?
(A) Preci class (B) Sec class (C) Date class (D) Time class
(25) Which of the following method is used to construct date object using current system time ?
(A) System() (B) SystemDate() (C) date() (D) Date()
(26) 1-D array is initialized using comma separated values of data elements using which brackets?
(A) ( ) (B) < > (C) [ ] (D) { }
(27) Sort () and Fill () methods be used in Java by ..... class.
(A) java.util.Arrays (B) util.java.Arrays (C) Java.Array.util (D) java.arrays.utils
(28) Which type of arrays are used to store tabular data in the form of rows and columns ?
(A) 1-D (B) 2-D (C) 3-D (D) All of these
(29) If user wants to store 15 integer values through arrays, then which of the following is used ?
(A) int m3 = new int [5] [3] (B) int m2 = new [5] [3]
(C) int m1 = new [15] [15] (D) int m4 = m4 int [2] [3]
(30) If ‘str’ is the object of string class and its content is “INDIAN FLAG”; then what is the value of str.length() ?
(A) 11 (B) 8 (C) 10 (D) 9
(31) Which constant is used to display year of calendar ?
(A) CAL (B) YEAR CAL (C) YEAR (D) MONTH
(32) Which constant is used to display Hour in 12-hour notation ?
(A) 12 HOUR (B) HOUR 12 (C) Hour_of_day (D) HOUR
(33) Which constant is used to display Day number in the year ?
(A) DAY_OF_YEAR (B) YEAR_DAY (C) YEAR (D) DAY_YEAR
(34) Vector is used to represent ..... dimensional data structure.
(A) 1 (B) 2 (C) 3 (D) 4
(35) What is useful to represent vector, matrix and other multi-dimensional data ?
(A) String (B) Arrays (C) Char (D) Integer
(36) if int mark[ ]={70, 90, 20} is defined, then what will be value of marks[2] ?
(A) 20 (B) Error (C) 70 (D) 90
(37) The array variable starts its index value with what ?
(A) Null (B) 2 (C) 1 (D) 0
(38) What is a variable representing a collection of homogeneous types of elements known in Java ?
(A) String (B) Array (C) Input (D) Element
(39) Which of the following refers to the starting index value in arrays in Java ?
(A) 3 (B) 2 (C) 1 (D) 0
(40) Which type of method is used to sort entire or part of array in Java ?
(A) sort() (B) fill() (C) show() (D) search()
(41) Which syntax is used to declare 1-dimensinal array ?
(A) <datatype> <arrayname> [ ]; (B) <datatype> [ ] <arrayname>;
(C) (A) or (B) (D) <arrayname> [ ] <datatype>;
(42) Which property is used with only array name returns the size of its first dimension in Java?
(A) size (B) width (C) length (D) byte
(43) In Java, String literals, a sequence of characters is enclosed between which sign ?
(A) ‘ ’ (Single quote) (B) “ ” (Double quotes) (C) < > (D) /* ..... */
(44) In Java, from the following which string methods are provided by string class ?
(A) To compare strings (B) Combining strings, converting strings
(C) To find length of string (D) All of these
(45) Which string method returns number of characters in invoking string in Java ?
(A) int length() (B) int byte() (C) int getByte() (D) int getlength()
(46) Java library provides Date class in which package ?
(A) java.lang (B) java.io (C) java.util (D) java.date
(47) Which constant defined for month of calendar of calendar class in Java ?
(A) month (B) MONTH (C) DATE (D) YEAR
(48) In Java, arrays are useful to represent which type of data ?
(A) Vector (B) Matrix (C) Multi - dimensional (D) All of these
(49) In Java, what is used to represent 2-D data structure like table of rows and columns ?
(A) Scalar (B) Vector (C) Element (D) Matrix
(50) In Java, to declare a 1-D array we use a pair of which brackets after array name of after datatype ?
(A) < > (B) [ ] (C) { } (D) ( )
(51) If ‘str’ is the object of string class and its content is “Hello” then what is the value of str.length() ?
(A) 5 (B) 6 (C) 7 (D) Error
(52) In Java, which of the following method can be used with java.util.Array class ?
(A) sort( ) (B) fill( ) (C) alert( ) (D) Both (A) and (B)
(53) In Java, to search an element in an array, Arrays class provides which method ?
(A) Binarysearch() (B) Stringsearch()
(C) Elementsearch() (D) LineIndsearch()
(54) In Java, 2-D array can be declared in which of the following correct way ?
(A) int marks () () = new int [5] [3] (B) int marks {} {} = new int [5] [3]
(C) int marks [] [] = new int [5] [3] (D) int marks <> <> = new int [5] [3]
(55) Java supports two types of strings that are handled by which of the following class or classes ?
(A) String class (B) StringBuffer class
(C) Both (A) and (B) (D) StringConstroctor class
(56) In Java, who creates a string object with its initial value using ary argument ?
(A) String (ary [objet] [ ]) (B) String (char ary [ ])
(C) String (ary [ ], int len) (D) String (ary ( ))
(57) In Java, characters are stored using how many bytes ?
(A) 16 bytes (B) 8 bytes (C) 4 bytes (D) 2 bytes
(58) Which are the methods provided by String class in Java ?
(A) To compare strings (B) Find length of strings
(C) Combining strings (D) All of these
(59) In Java which string class method returns true if invoking string is same as str ?
(A) int equals (string boolean) (B) boolean (Ignore case str)
(C) boolean equals (string str) (D) boolean (string)
(60) In Java, which string class method returns a string after appending str with the invoking string ?
(A) String combine (str) (B) String concate (string str)
(C) String add (str) (D) String join (str)
(61) Java library also provides Date class and Calendar class in which of the following package?
(A) java.attr (B) java.lang (C) java.expr (D) java.util
(62) In Java, which method of date class constructs date object using current system time ?
(A) getTime() (B) getDate() (C) Date() (D) DateTime()
(63) In Java, which method of date class sets new date and time of an object using elapsed time?
(A) short getTime() (B) void SetTime (long elapsed time)
(C) void SetDate (Date, Time) (D) setDate()
(64) In Java, which constant of calendar class displays day of calendar month ?
(A) DATE (B) DAY (date) (C) month (D) MONTH (date)
(65) In Java, what are the values used for AM_PM constant of calendar class ?
(A) 1 for AM, 12 for PM (B) 1 for AM, 0 for PM
(C) 1 for AM, 2 for PM (D) 0 for AM, 1 for PM
(66) In Java, which constant of calendar class displays Hours in 12-hour notation ?
(A) H_M_S (B) HOUR (C) HOUR_MINUTE (D) HOUR_OF_DAT
(67) In Java, by how many ways we can create an array object ?
(A) Infinite (B) 1 (C) 2 (D) 3
(68) Arrays are useful to represent which type of data in Java ?
(A) Vector (B) Matrix (C) Multi dimensional (D) All of these
(69) Which steps are followed for the process of creation of array in Java ?
(A) Declare an array object (B) Create an array object
(C) Both (A) and (B) (D) Manage an array object
(70) Which type of braces is used to initialize data elements in 1-D array ?
(A) < > (B) [ ] (C) { } (D) ( )
(71) We can use various static methods provided by Java using which array class ?
(A) java.util.Arrays (B) java.io (C) java.lang (D) All of these
(72) In Java, to search an element in an array, array class provides which type of method ?
(A) fill( ) (B) binarySearch( ) (C) sort( ) (D) remove()
(73) Which string constructor is used without arguments to create a string object with no characters ?
(A) string() (B) string(Char ary[])
(C) string (string strObj) (D) string(str literal)
(74) In Java, if ‘Str’ is the object of String class and its content is “Hello”, then what is the value of str.length() ?
(A) 8 (B) 7 (C) 6 (D) 5
(75) Which method of string class is used to return a string with all characters of invoking string converted to
upper case?
(A) int length() (B) byte[] getBytes()
(C) StringtoUppercase() (D) String concat(string str)
(76) What is the size of second dimension in an array sales[5][12] ?
(A) 12 (B) 5 (C) 60 (D) 11
(77) Which method of date class constructs date object using current system time in Java ?
(A) Time( ) (B) Today( ) (C) Date( ) (D) Now( )
(78) Which of the following is useful to represent vector, matrix and other multi dimensional data ?
(A) Function (B) Variable (C) Array (D) Structure
(79) Which of the following is used to represent 2D data structure like table of rows and columns ?
(A) Table (B) Variable (C) Cell (D) Matrix
(80) When we define Array, Index value starts with what ?
(A) 3 (B) 2 (C) 1 (D) 0
(81) If we have define array like int marks [ ] = {7, 9, 11, 13, 15, 17); then what will be the value of marks [4] ?
(A) 9 (B) 13 (C) 15 (D) 17
(82) Which of the following class is utilize in array to use methods sort( ) ?
(A) java.all.Arrays (B) java.math.Arrays
(C) java.function.Arrays (D) java.util.Arrays
(83) To search an element in an array, Array class provides which method ?
(A) searchElement() (B) elementSearch()
(C) binarySearch() (D) binaryElement()
(84) If in Java 2D Array is defined like int marks [ ] [ ] = new int [6] [4]; then, how many integers are stored in
memory using contiguous memory ?
(A) 10 (B) 64 (C) 42 (D) 24
(85) To initialize 2-D arrays, all these initialized rows are to be enclosed in curly braces { } and separated by
what ?
(A) Comma (B) Dot (C) Semicolon (D) Colon
(86) Java supports two types of strings that are handled by two classes namely as below ?
(A) String, Buffers (B) String, Buffered
(C) String, StringBuffered (D) String, StringBuffer
(87) Which of the following constructor used to create a string object that refers to the literal specified in
argument ?
(A) String (string arg [ ] ) (B) String (string literal)
(C) String (char arg [ ] ) (D) String (string ary [ ] )
(88) Which of the following method of string class used to return true if invoking string is same as Str ?
(A) boolean (String str) (B) boolean equals (String str)
(C) boolean CompareTo (String str) (D) boolean Compare (String str)
(89) Which of the following string method is used to return number of characters in invoking string ?
(A) int length() (B) int invoke()(C) int count() (D) int find()
(90) Which of the following method is used to return strings with all characters of invoking string converted to
upper case ?
(A) String Upper( ) (B) String caseUpper()
(C) String UpperCase() (D) String toUpperCase( )
(91) Which of the following method string class of Java does not provide ?
(A) Upper case of a string (B) Lower case of a string
(C) Reverse a string (D) Contacting a string
(92) Java library also provide Date class in which package ?
(A) java.util.Date (B) java.util (C) java.date.util (D) java.date.util
(93) Which of the following method of Date is used to construct Date object using current system time ?
(A) CurrentTime() (B) int Date() (C) Date() (D) int CurrTime()
(94) Which class can be used to extract detailed information like year, month, date, hour, minute and second?
(A) Month class (B) Calendar class (C) Year class (D) Second class
(95) Which of the following class encapsulate both date and time and represent the values using milliseconds
precision ?
(A) Month class (B) Year class (C) Date class (D) Time class
(96) Which of the following constant of calendar class helps to display week number within the month ?
(A) WEEK_OF_MONTH (B) WEEK_OF_NUMBER
(C) WEEK_OF_YEAR (D) WEEK_OF_NMONTH
(97) If ‘Str’ is the object of string class and its constant is “GUJARAT”, then what is the value of Str.length() ?
(A) 6 (B) 7 (C) 8 (D) 9
(98) Which type of array is used like table of rows and columns ?
(A) 1-D array (B) 2-D array (C) Minor array (D) Primitive array
(99) int marks [ ] [ ] = new int [5] [3] ; How many bytes are used in storage space ?
(A) 60 (B) 3 (C) 5 (D) 15
(100) Which constructor created a string object which is same as object specified in argument ?
(A) string() (B) string (char ary[ ])
(C) string (string strObj) (D) string (string literal)
(101) From the following which method of string class returns a string with all characters of invoking string
converted to upper case ?
(A) int length() (B) byte [ ] get bytes
(C) String toLowerCase() (D) String toUpperCase()
(102) Date class is in which package in Java ?
(A) java.io (B) java.util (C) java.lang (D) java.io.class
(103) What type of value is returned when we use get method of Calendar class with constant DAY_OF_WEEK
as an argument ?
(A) boolean (B) string (C) char (D) int
(104) If ‘str’ is the object of string class and its content is “I LIKE COMPUTER”, then what is the value of
str.length() ?
(A) 15 (B) 19 (C) 17 (D) 13
(105) What stands for AM and PM in integer constant of calendar class ?
(A) 0 and 0 (B) 1 and 1 (C) 1 and 0 (D) 0 and 1
(106) Which braces is used in 2-D array using comma separated values of data elements ?
(A) < > (angled bracket) (B) ( ) (simple bracket)
(C) { } (curly bracket) (D) [ ] (square bracket)
(107) Which of the following refer to the starting index value in arrays ?
(A) 0 (B) 1 (C) Null (D) All of these
(108) In Java, array index value starts from which number ?
(A) 0 (B) 1 (C) –1 (D) 8
(109) In Java, initial value for 1-D array are separated using which symbol ?
(A) . (Full stop) (B) , (Comma) (C) : (Colon) (D) – (Dash)
(110) Which of the following is not a correct way to create and initialize an array names marks ?
(A) int marks [ ] = new int [3]; (B) int [ ] marks = new int [3];
(C) int marks [ ] = {0, 10, 20}; (D) int marks [3] = {0, 10, 20};
(111) sort() and fill() are methods of which of the following Java class ?
(A) java.string (B) java.util.Arrays (C) java.io (D) java.util.io
(112) In the following statement for declaring 2-D array of Java 5 represents what ? int marks [ ] [ ] = new int
[5] [3]
(A) Number of rows (B) Number of columns
(C) Array size (D) Number of bytes
(113) In Java, which of the following constructor creates a string object same as object specified in argument ?
(A) String (char ary [ ]) (B) String ()
(C) String (String literal) (D) String (String strObj)
(114) In Java, int compareTo (String str) method returns which of the following value if invoking string is
greater than str ?
(A) 0 (B) >0 (C) <0 (D) Logical value
(115) Which of the following method of Java, returns an array of characters as bytes from invoking string ?
(A) string concat() (B) char getByte()
(C) byte [ ] getBytes() (D) string to byte()
(116) In Java, which of the following method of Date class returns a string representing date and time of
invoking object ?
(A) Date() (B) String toString()
(C) Date char() (D) Date Text()
(117) In Java, which constant of calendar class returns day number within a week ?
(A) DAY_OF_WEEK (B) DAY_OF_MONTH (C) DAY_OF_YEAR (D) DATE
Best of Luck