which one is more efficient int x; 1. if(x==null) 2.if(null==x) state which one either 1 or 2?
6 11214how tha garbage collector know that the object will be deleted? on which algorithm the garbage collector works? what is the working principle of garbage collector? How manay types of garbage collectors r there?
1 7281suppose we have an interface & that interface contains five methods. if a class implements that interface then we have to bound that to give tha definition of all five methods in that class. If we declare that class as abstract then can we call only two methods to give the deinition of that method & i don't want to give the definition of all the methods? can it possible
6 10208java program that takes a 3 digit number n and finds out whether the number 2^n + 1 is prime, or if it is not prime find out its factors.
7 10225why we write public static void main (String args[]) in core java plz explain briefly??????????????????
HCL,
3 8477if we give input as " hi how are you" then the output should be "uoy woh"...it should skip odd words in the input and should reverse even words from the end of string...can anyone help me to write this program in java
1 4163
Explain importance of finally block in java?
Say you want to store the information about a number of pets in an array. Typical information that you could store for each pet (where relevant) would be • Breed of animal • Animal's name • Its birth date • Its sex • Whether it has been sterilised or not • When it is due for its next inoculation • When it last had its wings clipped For each type of pet (eg. dog, cat or bird) you would typically define a class to hold the relevant data. Note: You do not need to implement these classes. Just answer the following questions. 3.1.1 What would be the advantage of creating a superclass (eg. Pet) and declaring an array of Pet objects over simply using an array of Objects, storing each of the instances of the different pet classes (eg. Dog, Cat or Bird) in it? 3.1.2 Would you define Pet as a class or as an interface? Why? (2) (2)
What is the use of singleton class?
What is class forname used for?
How many bits is a boolean?
What is a parameter in matrices?
When arithmeticexception is thrown?
Which package is imported by default?
What is a concrete classes? Is Java object class is concrete class?
What is casting in java programming?
What is the use of http-tunneling in rmi?
Describe 2 different ways to concatenate two strings.
What is strings in java?
Why are the methods of the math class static?
Why do we use return statement?