Sivakumar Swaminathan

Greenhorn
+ Follow
since May 26, 2004
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
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:
2085
MQRC_UNKNOWN_OBJECT_NAME
Unknown object name.
On an MQOPEN or MQPUT1 call, the ObjectQMgrName field in the object descriptor MQOD is set to one of the following:


Blank

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
19 years ago
char is unsigned.. and byte is signed..so conversion from byte to char might result in loss of information/precision..so..byte to char not allowed.. Friends,am i rite?
Hi,
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
System.out.println(x1==x2);

// 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

System.out.println(x1==x4);

//Case 4 println oints to same reference,hence returns true
System.out.println(x1==x5);


}
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.
Hi,
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?