Sivakumar Swaminathan

+ Follow
since May 26, 2004
Merit badge: grant badges
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Sivakumar Swaminathan

Check the name of the queue to which you are connecting.

if this is correct, then check the queue definition

excerpt from the manual:
Unknown object name.
On an MQOPEN or MQPUT1 call, the ObjectQMgrName field in the object descriptor MQOD is set to one of the following:


The name of the local queue manager

The name of a local definition of a remote queue (a queue-manager alias) in which the RemoteQMgrName attribute is the name of the local queue manager
However, the ObjectName in the object descriptor is not recognized for the specified object type.

Corrective action: Specify a valid object name. Ensure that the name is padded to the right with blanks if necessary. If this is correct, check the queue definitions
18 years ago
char is unsigned.. and byte is conversion from byte to char might result in loss of information/ to char not allowed.. Friends,am i rite?
String Literals will represent different references if they are newly created at runtime and hence return false. If the compiler is able to compute string literals at compile time,then, it will represent same references(because it can be found in the string pool),and hence return true.That is why when we declare a static final String and do the same thing you did, we get true.

Hope it helps! Please see the sample code..

Sample Code Check :
public final static String x3="ab";
public static void main(String[] args){

String x1 = "abc";

String x2 ="ab";
x2 = x2 + "c";

String x4 = x3+"c";

String x5= x1;

//Case 1 println: returns false

// Case 2 println : returns true because we are comparing canonical representations
System.out.println(x1.intern() == x2.intern());

//Case 3 println: returns true because literal string can be computed at compile time


//Case 4 println oints to same reference,hence returns true

It is true that static methods cannot be overriden.

But the code compiles because the method is "hidden" . Hiding can be done by using the same signature as the super class's method.

Usually, overriding is used in order to add new functionality to the super class's method and allowing more access than the overridden method. For example, if the super class's method has protected access, you can make it public in sub class. In static methods,you cannot call super class's method,so it is not possible to add additional functionality.Also, hiding is using the same signature(Friends,correct me if i am wrong :-))
The code is unreachable because since in the previous line you are throwing an exception, the try block can never be reached when the program runs.That is why it complains that the code is unreachable.
I just compiled the code and when I ran, got the output "Godsmack".
I think the problem comes when we declare an instance of the class Q031..
Friends,can you verify this?