Complete Question Index

Browse through all 2134 assessment questions (Page 8 of 15)

Java Programming3. Class And Objects, Date Api

What is the outcome of the code? public class Item { private String description; public String getDescription() { return description; } public void se...

Java Programming3. Class And Objects, Date Api

Given: public class Message { String msg; int noOfWords; public Message() { msg += " Thank you"; } public Message(int noOfWords) { this.noOfWords = no...

Java Programming3. Class And Objects, Date Api

Predict the output. public class Test { public static void main(String args[]) { int a = 2, b = 0; for ( ; b < 20; ++b) { if (b % a == 0) continue; el...

Java Programming3. Class And Objects, Date Api

Eclipse IDE, if we provide a workspace, it should already exist. If not, it will not open.

Java Programming3. Class And Objects, Date Api

What will be the output of the following code? int i=20; if(i>10) { System.out.println( "The value of i is "+i); i++; if(i%2!=0) break; }

Java Programming3. Class And Objects, Date Api

switch(a) { default: System.out.println("Welcome"); } Of which data types can the variable a be? 1. long 2. byte 3. int 4. char 5. float 6. short

Java Programming3. Class And Objects, Date Api

State True or False When using eclipse whichever classes are needed for the present class can be imported automatically.

Java Programming3. Class And Objects, Date Api

___ and _____ are the access specifiers that can be applied to top level Class.

Java Programming3. Class And Objects, Date Api

class Sample{ private double num = 100; private int square(int a){ return a*a; } } public class Test{ public static void main(String args[]){ Sample o...

Java Programming3. Class And Objects, Date Api

Choose the appropriate access specifier for the attribute value so that it can be accessed from anywhere. class Test { public int value; }

Java Programming3. Class And Objects, Date Api

Consider the below code snippet and determine the output. class Student { private int studentId; private float average; } class Test { public static v...

Java Programming3. Class And Objects, Date Api

The below code snippet shows an error cannot find symbol: System.out.println("BookId:"+bobj.getId()); public class Book { private int bookId; private ...

Java Programming3. Class And Objects, Date Api

Observe the below code. public class Student { private int id; private String name; private char grade; //Constructor 1 public Student() { id=0; name=...

Java Programming3. Class And Objects, Date Api

Observe the code below. public class Student { int studentId; String name; char grade; public Student(int studentId, String name, float mark) { this.s...

Java Programming3. Class And Objects, Date Api

Observe the below class. class Product{ int productId; String productName; Product { productId=0; productName= ; } Product(int id, String name) { //ac...

Java Programming3. Class And Objects, Date Api

Given the class Book in packages p1 and class Main in package p2. In main to create an object of Book, which of the following are valid.

Java Programming3. Class And Objects, Date Api

Given the class Book and Library in two different packages : 1. package model; 2. public class Book { 3. private static void countBook { } 4. } 1. pac...

Java Programming3. Class And Objects, Date Api

Choose the correct order of the Java code fragments: 1) public class Main, 2) import java.util.Scanner;, 3) {, 4) // Some code here, 5) }, 6) package ...

Java Programming3. Class And Objects, Date Api

Assume class Calculator in package p1 and CalculatorService class in package p2 as shown below. package p1; public class Calculator { __________ stati...

Java Programming3. Class And Objects, Date Api

For the below code, what are the valid ways to invoke display method in the main method. public class Test { public static void display(){ } } public ...

Java Programming4. Arrays And Strings

List the correct ways of declaring an Array.

Java Programming4. Arrays And Strings

What is the output of this program? class Output { public static void main(String args[]) { int a1[] = new int[10]; int a2[] = {1, 2, 3, 4, 5}; System...

Java Programming4. Arrays And Strings

StringBuffer is used to create ______________.

Java Programming4. Arrays And Strings

Given a one-dimensional array arr, what is the correct way of getting the number of elements in arr?

Java Programming4. Arrays And Strings

class ArrayTest { public static void main(String args[]) { int[] primes = new int[10]; primes[0] = "a"; System.out.println(primes[0]); } } What will b...

Java Programming4. Arrays And Strings

State True or False. Advanced for loop is better as it is less error prone as we don't need to deal with index.

Java Programming4. Arrays And Strings

String name="teknoturf"; String cname="teknoturf"; String compname=new String("teknoturf"); 1.if(name==cname) 2.if(name.equals(cname)) 3.if(name==comp...

Java Programming4. Arrays And Strings

String Objects are mutable. State true or false.

Java Programming4. Arrays And Strings

class TestArray { public static void main(String args[]) { int arr_sample[] = new int[2]; System.out.println(arr_sample[0]); } } What will be the resu...

Java Programming4. Arrays And Strings

which of the following packages can you find String class?

Java Programming4. Arrays And Strings

StringBuilder is less efficient and slower than StringBuffer. State true or false.

Java Programming4. Arrays And Strings

Given: public class ItemTest { private final int id; public ItemTest(int id) { this.id = id; } public void updateId(int newId) { id = newId; } public ...

Java Programming4. Arrays And Strings

Predict the Output of following Java Program. class Test { int x = 10; public static void main(String[] args) { System.out.println(x); } }

Java Programming4. Arrays And Strings

Identify the true statement(s). Statement 1 : When no constructor is written in a class, the compiler creates a default constructor Statement 2 : The ...

Java Programming4. Arrays And Strings

A JavaBeans component has the following field: private boolean enabled; Which two pairs of method declarations follow the JavaBeans standard for acces...

Java Programming4. Arrays And Strings

package edu.ABC.model; public class Account { public static final float INTERTEST_RATE = 7.5; } Identify the correct options from the classes provided...

Java Programming4. Arrays And Strings

Which members of a class can be accessed by other classes is determined by the ________________

Java Programming4. Arrays And Strings

Identify which statement is true about construtors.

Java Programming4. Arrays And Strings

What does this() mean in constructor chaining concept?

Java Programming4. Arrays And Strings

class Output { public static void main(String args[]) { int a1[] = new int[10]; int a2[] = {1, 2, 3, 4, 5}; System.out.println(a1.length + " " + a2.le...

Java Programming4. Arrays And Strings

_______________ is used to allocate memory to array variable in Java

Java Programming4. Arrays And Strings

Predict the output p class String_demo { public static void main(String args[]) { int ascii[] = { 65, 66, 67, 68}; String s = new String(ascii, 1, 3);...

Java Programming4. Arrays And Strings

Determine the output: class Evaluate { public static void main(String args[]) { int arr[] = new int[] {0 , 1, 2, 3, 4, 5, 6, 7, 8, 9}; int n = 6; n = ...

Java Programming4. Arrays And Strings

Predict the output class String_demo { public static void main(String args[]) { char chars[] = {'a', 'b', 'c'}; String s = new String(chars); System.o...

Java Programming4. Arrays And Strings

Determine the output: (MCQ) public class Test { public static void main(String[] args) { int[] x = new int[3]; System.out.println("x[0]is"+x[0]); Sys ...

Java Programming4. Arrays And Strings

Given: 1. public class MyLogger { 2. private StringBuilder logger = new StringBuuilder(); 3. public void log(String message, String user) { 4. logger....

Java Programming4. Arrays And Strings

________________ is used to find string length.

Java Programming4. Arrays And Strings

Determine the output: public class Test { public static void main(String[] args) { int[] x = {1, 2, 3, 4}; int[] y = x; x = new int[2]; for(int i = 0;...

Java Programming4. Arrays And Strings

What is special about string objects as compared to objects of other derived types?

Java Programming4. Arrays And Strings

__________________ is the string contained in s after following lines of code? StringBuffer s = new StringBuffer(Hello); s.deleteCharAt(0);

Java Programming4. Arrays And Strings

What will be the content of array variable table after executing the following code? public class Trial { public static void main(String[] args) { int...

Java Programming4. Arrays And Strings

What will s2 contain after following lines of code? String s1 = one; String s2 = s1.concat(two);

Java Programming4. Arrays And Strings

Determine the output class array_output { public static void main(String args[]) { char array_variable [] = new char[10]; for (int i = 0; i < 10; ++i)...

Java Programming4. Arrays And Strings

+ operator can be used to concatenate two or more String objects in java. State true or false.

Java Programming4. Arrays And Strings

Column size is mandatory to create an array in java. State true or false

Java Programming4. Arrays And Strings

Determine the output public class Trial { public static void main(String[] args) { int arr[4]={}; System.out.print(arr[0]); } }

Java Programming4. Arrays And Strings

Determine the output: public class A { public static void main(String argv[]) { int ary[]=new int[]{1,2,3}; System.out.println(ary[1]); } }

Java Programming5. Regular Expression

Which of the following text when matched with the regular expression [a-zA-Z&&[^aeiou]]+ will return true?

Java Programming5. Regular Expression

What is the regular expression to match any date in the format "yyyy-mm-dd" in a string?

Java Programming5. Regular Expression

a regular expression, the pattern 00 means, 0 occurs exactly two times.

Java Programming5. Regular Expression

What is the regular expression to match a whitespace character in a string?

Java Programming5. Regular Expression

The first name of a person should contain only alphabets and space. Which of the following regular expression will match the requirement?

Java Programming5. Regular Expression

What is the regular expression to match any email address in a string?

Java Programming5. Regular Expression

Consider the below statements. Statement 1 : Matcher class interprets the pattern in a String Statement2:Matcherclassmatchestheregularexpression again...

Java Programming5. Regular Expression

What is the regular expression to match a digit (0-9) in a string?

Java Programming5. Regular Expression

Predict the output of the below code : import java.util.regex.*; public class TestRegEx{ public static void main(String args[]) { Pattern p = Pattern....

Java Programming5. Regular Expression

\B means A word boundary

Java Programming5. Regular Expression

Observe the below code snippet String name="Sudha learns Oracle"; System.out.println(name.substring(7,12)); What is the output of the above code?

Java Programming5. Regular Expression

Predict the output of the below code : String emailId="john#global.com"; System.out.println(emailId.indexOf('@'));

Java Programming5. Regular Expression

What can be the parameters for the indexOf method in String class?

Java Programming5. Regular Expression

Observe the below code : String course="Java Programming"; char c=course.charAt(16); System.out.println(c); What will be the output for the above code...

Java Programming5. Regular Expression

Assume that the ID of an employee should start with "CBE" or "BLR" or "HYD" followed by hyphen (-) followed by 4 digits. Choose the apt regular expres...

Java Programming5. Regular Expression

Which of the following matches X occurs n or more times?

Software Engineering02 Introduction To Algorithms , Flowcharts & Pseudocode

Stephany is learning to draw a flowchart to calculate the area of a circle. Select the appropriate option that would fit into the process section of t...

Software Engineering02 Introduction To Algorithms , Flowcharts & Pseudocode

Arrange the words given below in a meaningful sequence. 1. Word 2. Paragraph 3. Sentence 4. Letters 5. phrase

Software Engineering02 Introduction To Algorithms , Flowcharts & Pseudocode

Identify the meaningful variable names which can be used?

Software Engineering02 Introduction To Algorithms , Flowcharts & Pseudocode

Choose the correct and meaningful pseudo-code to add two numbers?

Software Engineering02 Introduction To Algorithms , Flowcharts & Pseudocode

Match the appropriate Flowchart symbols with its purpose. Start/Stop Flow direction Connector Decision making Process Input/output

Software Engineering02 Introduction To Algorithms , Flowcharts & Pseudocode

Which of the following represents the correct sequence for the given pseudo-code? BEGIN ------------- ------------- ------------- ------------- END a....

Software Engineering02 Introduction To Algorithms , Flowcharts & Pseudocode

Expression is a combination of ___________, ____________ and _______________

Software Engineering02 Introduction To Algorithms , Flowcharts & Pseudocode

Which of the following represents the correct sequence for the given algorithm? a. Start Get the two numbers. Add the two numbers and store the result...

Software Engineering02 Introduction To Algorithms , Flowcharts & Pseudocode

Choose the correct arrang5eme2nt of2 ma4them8atical symbols to make the equation true. a. 600 [+] 400 [] 800 [×] 300 [/] 200 = 200 b. 600 [/] 400 [+] ...

Software Engineering02 Introduction To Algorithms , Flowcharts & Pseudocode

Which of the following represents the correct sequence for the given pseudo-code? BEGIN [1] READ mark1, mark2, mark3, mark4, mark5 [2] PRINT average [...

Software Engineering02 Introduction To Algorithms , Flowcharts & Pseudocode

Flow chart for adding numbers Is the given flowchart correct?

Software Engineering02 Introduction To Algorithms , Flowcharts & Pseudocode

Rearrange the pseudo-code for multiplying two given numbers, Choose the correct option from the below. 1 BEGIN 2 result <- number1 * number2 3 PRINT r...

Software Engineering03 Selection Statements

If there are 6 chocolates and you take away 4, how many do you have?

Software Engineering03 Selection Statements

What do you infer from this statement? Only if Alvin is happy, then he does not go to work.

Software Engineering03 Selection Statements

By default, the flow of a program is________

Software Engineering03 Selection Statements

Identify the correct pseudo-code logic for checking a number divisible by 5 or 11. a. DECLARE number IF number%5==0 THEN PRINT number divisible by 5 E...

Software Engineering03 Selection Statements

Choose the correct options to complete the pseudo-code and determine whether the number is positive, zero, or negative. BEGIN DECLARE number READ numb...

Software Engineering03 Selection Statements

Go to statements in the algorithm is

Software Engineering03 Selection Statements

______________must be used when a set 5of st2atem2ents4 nee8ds to be executed only if a condition is met.

Software Engineering03 Selection Statements

Which of the keyword is used to close the IF block, while writing a pseudo-code?

Software Engineering03 Selection Statements

READ age IF age>18 THEN PRINT Eligible to vote ENDIF The given pseudo-code snippet is an example for_______

Software Engineering03 Selection Statements

When a single if-else logic is used, how many possible choices can be there?

Software Engineering03 Selection Statements

Decision statements are also called as _______________. a. Sequence logic b. Iteration logic c. Program logic d. Selection logic

Software Engineering03 Selection Statements

You are returning home from a hotel. On the way, you find a sealed envelope in a street, fully addressed with unused stamps on it. What would you do??...

Software Engineering03 Selection Statements

Try some!!! If a doctor gives you 3 pills and tells you5 to ta2ke o2ne p4ill ev8ery half hour, how long would it take before all the pills had been ta...

Software Engineering03 Selection Statements

Manual execution of the steps in the algorithm is called as _____

Software Engineering03 Selection Statements

Which statement logic implements multiple-way selection?

Software Engineering03 Selection Statements

A computer program must either use conditional statements or looping statements or sequential statements to solve a problem. All of them must not appe...

Software Engineering03 Selection Statements

Consider the pseudo-code snippet. What output do you think the snippet will produce if the sample input for number is 3? BEGIN DECLARE number READ num...

Software Engineering03 Selection Statements

Identify the logic which suits the flowchart

Software Engineering03 Selection Statements

Which of the following is not a keyword used in a pseudo-code

Software Engineering03 Selection Statements

From the option, find the correct pseudo-code to find the greatest of three numbers

Software Engineering03 Selection Statements

Pointing to a photograph of a boy Mathew said, "He is the son of the only son of my mother." How is Mathew related to that boy?

Software Engineering03 Selection Statements

Analyze the statements. i)Danny is younger than Edwin ii)Christine is younger than Danny. iii)Christine is older than Edwin. If the first two statemen...

Software Engineering03 Selection Statements

Assume, there are four boys sitting on a sofa. Mithran is to the left of Anwar. Babu is to the right of Anwar. Edwin is between Anwar and Babu. Who wo...

Software Engineering03 Selection Statements

"Invalid balloon number " O5R nu2mber2 > 14 OR 8number < 50 "This balloon can fiy to Tweety" OR number < 1 PRINT AND number%7 == 0 number%3 == 0 numbe...

Software Engineering03 Selection Statements

Choose the correct pseudocode for the below problem statement. Problem Statement : Hide and Seek One day, Bunny and his friends were playing hide and ...

Software Engineering04 Looping Statements

Which looping logic is exit controlled?

Software Engineering04 Looping Statements

Consider the output: 0, 2, 4, 6, 8 ,10 ,12, 16 Which of the below given pseudo code snippet gives the above output?

Software Engineering04 Looping Statements

Predict the output of the given flowchart.

Software Engineering04 Looping Statements

Iteration/looping is a repetition of___________

Software Engineering04 Looping Statements

Do-while looping statement is almost same as______

Software Engineering04 Looping Statements

What is true about FOR LOOP?

Software Engineering04 Looping Statements

Jack wants to book fiight tickets in Feather-Airways online portal for his family of five. Passenger details like name, age, gender etc. should be ent...

Software Engineering04 Looping Statements

What will be the output for WHILE loop? BEGIN DECLARE number SET number <-- 30 WHILE number>0 number <-- number-4 END WHILE PRINT number END

Software Engineering04 Looping Statements

What is the output for FOR-loop snippet? FOR i <--1 to 15 PRINT i i <-- i+3 END FOR

Software Engineering04 Looping Statements

Which of the following symbols is inappropriate in building the flowchart pertaining to sequential flow of program?

Software Engineering04 Looping Statements

The statement / statements within the loop must get executed at least once except for do-while statement. State True/False.

Software Engineering04 Looping Statements

Which of the following statements are true with respect to looping statements?

Software Engineering04 Looping Statements

Which of the following statements are true?

Software Engineering04 Looping Statements

Consider you have a Rubik cube with different colors in each face. To solve this cube, you will continue to rotate the sides until you reach same colo...

Software Engineering04 Looping Statements

Partially w h r e a i f l g o t m n p d DOWN: 1) Step by step list of instructions 4) When you know the exact number of iterations, this loop is used ...

Software Engineering04 Looping Statements

Identify the logic which suits the flowchart?

Software Engineering04 Looping Statements

It's Halloween. You go from house to house, tricking or treating. You get 2 candies from each house that you go to. You must return home once you coll...

Software Engineering04 Looping Statements

Looping statements are also called ____________ a. Sequence logic b. Program logic c. Selection logic d. Iteration logic

Software Engineering04 Looping Statements

Find out the logic of series and complete. 9 = 4, 21 = 9, 22 = 9, 24 = 10, 8 = 5, 7 = 5, 99 = 10, 100 = 7, 16 = ?

Software Engineering04 Looping Statements

Take 1 away from me and you get a prime number; add 1 to me and you get twice that prime number.

Software Engineering04 Looping Statements

Select the appropriate code snippet for the given problem statement provided as pseudocode. Problem Statement : Strong number Check if a given number ...

Software Engineering04 Looping Statements

Choose the pseudocode for the below problem statement. Problem Statement : Vehicle Registration Mr.William buys a new Audi car. During the vehicle reg...

Software Engineering05 Arrays

A mathematical quiz context happened in a school and the scores are stored in an array named quizmark. The coordinating person wants to copy the quiz ...

Software Engineering05 Arrays

Assume, number[100] <- 99. How many elements can be stored inside the array variable number?

Software Engineering05 Arrays

Which of the following are False with respect to the manipulation of arrays?

Software Engineering05 Arrays

Negative elements can be placed inside an array. State true / false

Software Engineering05 Arrays

The names of all associates undergoing training are stored in an array named associate_name[50]. The 5th associates name is retrieved as

Software Engineering05 Arrays

Information about ___________ need not be specified when declaring an array

Software Engineering05 Arrays

It is not possible to do a search operation in an array that is not sorted. State True/False.

Software Engineering05 Arrays

Random access is not possible in an array. State True/False

Software Engineering05 Arrays

Assume you have an array5 nam2ed n2umb4ers 8of size 10. Which of the assignment is valid?

Software Engineering05 Arrays

Which of the following statements is correct with respect to arrays?

Software Engineering05 Arrays

Consider you buy a laptop. You want to store5 the 2deta2ils o4f tha8t laptop such as price, model_name,model_number, warranty_period into a single arr...

Software Engineering05 Arrays

Consider you want to compare the prices of redmi , sony, samsung phones in three online sites like amazon,fiipkart,ebay. Which array type is best suit...

Software Engineering05 Arrays

It is possible to traverse through an array from the first position to the last and not vice versa. State true or false.

Software Engineering05 Arrays

An Array consists of rows and columns is also called as________

Software Engineering05 Arrays

Choose the correct Pseudo code to store names in an array and display a name. a. BEGIN INPUT name DECLARE name [20] PRINT name END b. BEGIN INPUT name...

Software Engineering05 Arrays

A farmer has 17 sheep and all but nine die. How many are left?

Software Engineering05 Arrays

a year, there are 12 months. Seven months have 31 days. How many months have 28 days?

Software Engineering05 Arrays

What is the next letter in the following sequence? J,F, M, A, M, J, J, A, __.

PreviousPage 8 of 15Next