Given two strings like x=?hello? and y=?open?, remove any
character from string x which is also used in string y,
thus making the result x=?hll?.
Answers were Sorted based on User's Feedback
Answer / nisha sharma
class Stringb
{
public static void main(String a[])
{
StringBuffer sb=new StringBuffer("Hello");
StringBuffer sb1=sb.deleteCharAt(1);
StringBuffer sb2=sb1.deleteCharAt(3);
System.out.println(sb2);
}
}
| Is This Answer Correct ? | 4 Yes | 6 No |
Answer / bijoy kumar baral
Public abstract ClassDemo
{
public static void main(string args[]){
StringBuffer sb1= new stringBuffer("Hello");
StringBuffer sb2= new stringBuffer("open");
stringbuffer a= sb.deletecharacterAt("hello",1);
system.out.println("the value of a:"+a);
stringBuffer x=sb.deletecharacterAt("hllo"3);
system.out.println(x:+"x");
}
| Is This Answer Correct ? | 1 Yes | 4 No |
Answer / shilpa
x="hello", y="open"
so we have to remove e and o from x, so its hll
| Is This Answer Correct ? | 0 Yes | 8 No |
how to find the largest of given numbers in an array
difference between overloading and overridding
Is enum a class?
Why is oop useful?
What is polymorphism give a real life example?
How is polymorphism achieved?
Write a java applet that computes and displays the squares of values between 25 and 1 inclusive and displays them in a TextArea box
What is overriding vs overloading?
Difference between new operator and operator new
What is the difference between and interface and an abstract class ?
4 Answers IBM, Infosys, Ness Technologies,
Why we use classes in oop?
1. Wrie a function which returns the most frequent number in a list of integers. Handle the case of more than one number which meets this criterion. public static int[] GetFrequency(int[] list)