• Result
  • Today's Puzzle
    • Previous Puzzles
    • Prize & Rules
  • Discussion Board
    • Suggestion Board
    • Trending Articles
  • Maths Tricks
  • Placement Papers
    • Placement Questions
    • Interview Experience
    • Placed user Comment
    • Group Discussion
  • English APP
  • login
  • Result
  • Today's Puzzle
    • Previous Puzzles
    • Prize & Rules
  • Discussion Board
    • Suggestion Board
    • Trending Articles
  • Maths Tricks
  • Placement Papers
    • Placement Questions
    • Interview Experience
    • Placed user Comment
    • Group Discussion
  • Walkins
    • Corporate Job Exam
    • Government Job Exam
    • Entrance Exam
  • Training
    • Internship
  • Placement Questions

Placement Papers with Solutions

Company

  • 3i-Infotech 345
  • Accenture 548
  • ADITI 81
  • Athenahealth 72
  • CADENCE 37
  • Capgemini 519
  • CMC 49
  • Cognizant 29
  • CSC 480
  • CTS 1340
  • Dell 49
  • Elitmus 44
  • GENPACT 516
  • Google 55
  • HCL 217
  • Hexaware 92
  • Huawei 81
  • IBM 1714
  • IGate 169
  • Infosys 2050
  • L&T 299
  • Microsoft 61
  • Miscellaneous 204
  • Oracle 74
  • Other 95
  • Patni 199
  • Sapient 44
  • Sasken 31
  • Self 38
  • Syntel 530
  • TCS 9109
  • Tech Mahindra 500
  • Wipro 1182

Exam

  • ACIO 119
  • AIEEE 334
  • AMCAT 2636
  • Assessment 108
  • Bank 22
  • CAT 988
  • CMAT 82
  • Cocubes 39
  • Elitmus 2952
  • Exam 39
  • Gate 846
  • GMAT 107
  • Gmate 29
  • GRE 469
  • IIT-JEE 471
  • ITC 28
  • Maths Olympiad 205
  • MBA 3480
  • MCA 32
  • Other 159
  • Others 25
  • R-SAT 111
  • Self 68

Government Jobs Exams

  • Bank Exam 478
  • CDS 57
  • CTET 21
  • IBPS 1258
  • IES EC 44
  • KVPY 364
  • NDA 481
  • NTSE 36
  • REVENUE OFFICE 53
  • RRB 1029
  • SSC 1294
  • UPSC 441

Interview

  • HR Interview 426
  • HR Round 41

Maths Puzzle

  • A website 299
  • Book 23779
  • Campus 250
  • CMAT 49
  • Exam 86152
  • General 399
  • Interview 141
  • M4maths 295
  • Maths 226
  • Orkut 27
  • Other 72
  • Others 1356
  • Reasoning 101
  • Self 3157

Programming and Technical

  • Android 118
  • ASP.NET 60
  • C 459
  • C++ 448
  • DATA STRUCTURE 66
  • DBMS 77
  • ELECTRONICS 39
  • Java 261
  • OOPs Concepts 117
  • Operating Syst 103
  • RDBMS 109
  • UNIX 70
Keep an EYE (0)Interview Experience (261)
Solved Question (6040) UnSolved Question (153943)
Pages: 15999FirstPrev234567891011NextLast
Advertisements

(#M40167120) JAVA QUESTION Matcher class Keep an EYE Keep an eye puzzle Keep an eye puzzle

Consider the below statements.

Statement 1 : Matcher class interprets the pattern in a String

Statement 2 : Matcher class matches the regular expression against the text provided

Which of the following is true?

A. Statement 2 alone is correct.
B. Both Statement 1 and 2 are incorrect.
C. Statement 1 alone is correct.
D. Both Statement 1 and 2 are correct

Asked In Java Jax (3 years ago)
Unsolved Read Solution (1)
Is this Puzzle helpful?   (2)   (1) Submit Your Solution Functions

(#M40167119) JAVA QUESTION equals() vs == based question Keep an EYE Keep an eye puzzle Keep an eye puzzle

What is the output of the following program?

import java.util.Arrays;

class Test
{
public static void main(String args[])
{
String[] cities = new String[]{"London", "Paris", "NewYork", "HongKong", "Tokyo"};
String[] metros = new String[]{"London", "Paris", "NewYork", "HongKong", "Tokyo"};
String[] capitals = cities;
System.out.println("cities == metros : " + (cities == metros));
System.out.println("cities == capitals : " + (cities == capitals));
System.out.println("cities.equals(metros) : " + cities.equals(metros));
System.out.println("cities.equals(capitals) : " + cities.equals(capitals));
System.out.println("Arrays.equals(cities, metros) : " + Arrays.equals(cities, metros));
System.out.println("Arrays.equals(cities, capitals) : " + Arrays.equals(cities, capitals));
}
}


A. cities == metros : false
cities == capitals : true
cities.equals(metros) : true
cities.equals(capitals) : true
Arrays.equals(cities, metros) : false
Arrays.equals(cities, capitals) : true

B. cities == metros : false
cities == capitals : true
cities.equals(metros) : true
cities.equals(capitals) : true
Arrays.equals(cities, metros) : true
Arrays.equals(cities, capitals) : true

C. cities == metros : false
cities == capitals : true
cities.equals(metros) : false
cities.equals(capitals) : true
Arrays.equals(cities, metros) : true
Arrays.equals(cities, capitals) : true

D. cities == metros : false
cities == capitals : true
cities.equals(metros) : false
cities.equals(capitals) : true
Arrays.equals(cities, metros) : true
Arrays.equals(cities, capitals) : false

Asked In Java Jax (3 years ago)
Unsolved Read Solution (1)
Is this Puzzle helpful?   (0)   (0) Submit Your Solution
Advertisements

(#M40167118) JAVA QUESTION Number of string objects Keep an EYE Keep an eye puzzle Keep an eye puzzle

public String makingStrings()
{
String str = "Welcome";

str = str.substring(1, 5);

str = str.toUpperCase();

return str;
}

How many String objects are created in the heap when this method is invoked?

A. 4
B. 2
C. 3
D. 1

Asked In Java Jax (3 years ago)
Unsolved Read Solution (1)
Is this Puzzle helpful?   (3)   (1) Submit Your Solution Basics

(#M40167117) JAVA QUESTION Access Modifiers Keep an EYE Keep an eye puzzle Keep an eye puzzle

Given a method in a public class, ________ access modifier must be used to restrict access to that method to only the other members of the same class.

A. final
B. private
C. protected
D. default

Asked In Java Jax (3 years ago)
Unsolved Read Solution (1)
Is this Puzzle helpful?   (0)   (0) Submit Your Solution

(#M40167116) JAVA QUESTION Java Polymorphism question Keep an EYE Keep an eye puzzle Keep an eye puzzle

What is the output of the following program?

class Icecream
{
public void displayName(String s)
{
System.out.println(s+" "+"Icecream");
}
public void describe(String s)
{
System.out.println(s+" "+"Icecream: Ice cream is a sweetened frozen food typically eaten as a snack or dessert. ");
}
}

class Faloodeh extends Icecream
{
public void displayName(String s)
{
System.out.println(s+" "+"Faloodeh ");
}

public void describe(String s)
{
System.out.println(s+" "+"Faloodeh: Faloodeh is often served alongside Persian-style dairy-based ice cream ");
}
}

public class Test
{
public static void main(String arg[])
{
Icecream a = new Faloodeh();
Faloodeh b = (Faloodeh)a;
a.displayName("test");
b.displayName("test");
a.describe("test");
b.describe("test");
}
}

A. test Faloodeh: Faloodeh is often served alongside Persian-style dairy-based ice cream
test Faloodeh: Faloodeh is often served alongside Persian-style dairy-based ice cream
test Faloodeh
test Faloodeh

B. test Faloodeh
test Faloodeh
test Faloodeh: Faloodeh is often served alongside Persian-style dairy-based ice cream
test Faloodeh: Faloodeh is often served alongside Persian-style dairy-based ice cream

C. test Faloodeh
test Faloodeh: Faloodeh is often served alongside Persian-style dairy-based ice cream
test Faloodeh: Faloodeh is often served alongside Persian-style dairy-based ice cream
test Faloodeh

D. test Faloodeh: Faloodeh is often served alongside Persian-style dairy-based ice cream
test Faloodeh
test Faloodeh
test Faloodeh: Faloodeh is often served alongside Persian-style dairy-based ice cream

Asked In Java Jax (3 years ago)
Unsolved Read Solution (1)
Is this Puzzle helpful?   (6)   (5) Submit Your Solution Output

(#M40167115) JAVA QUESTION Inheritance relationship in Java Keep an EYE Keep an eye puzzle Keep an eye puzzle

Which of the following statements are correct with respect to inheritance relationship in java?

A. object of subclass referenced by super class type can invoke super class methods
B. object of subclass referenced by super class type can access newly defined sub class variables
C. object of subclass referenced by super class type can access super class variables
D. object of subclass referenced by super class type can invoke overridden sub class methods
E. object of subclass referenced by super class type can invoke newly defined sub class methods

Asked In Java Jax (3 years ago)
Unsolved Read Solution (1)
Is this Puzzle helpful?   (0)   (2) Submit Your Solution Technical

(#M40167114) JAVA QUESTION Java question Keep an EYE Keep an eye puzzle Keep an eye puzzle

What will be the output of the following program?

class A
{
public void test()
{
System.out.println("Class A");
}
}
class Trial extends A
{
public void test()
{
System.out.println("Class Trial");
}
public static void main(String args[])
{
Trial object = (Trial)new A();
object.test();
}
}

A. Runtime Error
B. Compile Time Error
C. Class A
D. Class Trial

Asked In Java Jax (3 years ago)
Unsolved Read Solution (2)
Is this Puzzle helpful?   (1)   (1) Submit Your Solution Output

(#M40167113) JAVA QUESTION instanceof question Keep an EYE Keep an eye puzzle Keep an eye puzzle

What will be the output of the program?

class Tree { }

class Pine extends Tree { }

class Oak extends Tree { }

public class Forest1
{
public static void main (String [] args)
{
Tree tree = new Pine();

if( tree instanceof Pine )
System.out.println ("Pine");

else if( tree instanceof Tree )
System.out.println ("Tree");

else if( tree instanceof Oak )
System.out.println ( "Oak" );

else
System.out.println ("Oops ");
}
}

A. Oops
B. Tree
C. Pine
D. Forest

Asked In Java Jax (3 years ago)
Unsolved Read Solution (1)
Is this Puzzle helpful?   (0)   (1) Submit Your Solution Output

(#M40167112) JAVA QUESTION Java question Keep an EYE Keep an eye puzzle Keep an eye puzzle

Which three statements are true?

A. A method with the same signature as a private final method in class X can be implemented in a subclass of X.
B. A protected method in class X can be overridden by a subclass of A only if the subclass is in the same package as X.
C. A private static method can be called only within other static methods in class X.
D. A public static method in class X can be called by a subclass of X without explicitly referencing the class X.
E. A protected method in class X can be overridden by any subclass of X.
F. A final method in class X can be abstract if and only if X is abstract.
G. A non-static public final method in class X can be overridden in any subclass of X.

Asked In Java Jax (3 years ago)
Unsolved
Is this Puzzle helpful?   (0)   (0) Submit Your Solution Technical

(#M40167111) JAVA QUESTION Default method in java Keep an EYE Keep an eye puzzle Keep an eye puzzle

A default method in an interface can be either private or public or protected. State True or False.

Asked In Java Jax (3 years ago)
Unsolved Read Solution (1)
Is this Puzzle helpful?   (5)   (3) Submit Your Solution Functions
Keep an EYE (0)Interview Experience (261)
Solved Question (6040) UnSolved Question (153943)
Pages: 15999FirstPrev234567891011NextLast
  • Login
  • Register

Resend

Sponsored Links

Advertisements

Challenger of the Day

no image
Dimple
India
Punjab
Time: 00:01:33
Points
19

Maths Quotes

Mathematics is the Queen of the Sciences

Professor Robert Silensky

"Numbers have life ; they are not just symbols on paper"

Sushmitha

Placed User Comments

M4Math helped me a lot.

Vipul Chavan 4 years ago

Thanks m4 maths for helping to get placed in several companies.
I must recommend this website for placement preparations.

yash mittal 5 years ago
  • 2532K+Registerd user
  • 1773K+Engineers
  • 759K+MBA Asprirant
  • 3K+Enginnering College
  • 250+Company Exam
  • 150K+Interview Questions
  • Site Links
  • Home
  • Result
  • Today's Puzzle
  • Discussion Board
  • Maths Tricks
  • Advertise with us
  • Contact Us
  • Useful Info
  • Maths Quotes
  • Previous Puzzles
  • Prize
  • Privacy Policy
  • Disclaimer and Copyright
  • Terms and Conditions
  • Sitemap
  • Placement papers
  • TCS Placement Paper
  • HCL Placement Paper
  • INFOSYS Placement Paper
  • IBM Placement Paper
  • SYNTEL Placement Paper
  • TECHNICAL Interview
  • HR Interview
All rights are reserved to @m4maths.com