Some Methods syntax needs to be remembered: protected Object readResolve() { return getInstance(); } protected void finalize() throws Throwable { try { close(); // close open files } finally { super.finalize (); // This is mandatory to write } } //normally it should be overridden to clean-up non-Java resources ie closing a file //in singleton classs public Object clone() throws CloneNotSupportedException { throw new CloneNotSupportedException(); } } –pleae note that this method is present in Object class not in Cloneable Interface as it is marker interface MultiThreading means: thread-safe = true. Overloading is providing multiple methods with the same name but different arguments (and potentially return type). Overriding is changing the behavior of a method in a subclass. Only objects are instantiated in the Java Runtime Environment (JRE) and held in a division of the program's memory allocation called the heap. S...
HOW TO REVERT BACK THE CHANGES WHICH HAVE COMMITED INTO RTC REPOSITORY: = IN ECLIPSE Right click on the owning component in the Pending Changes view and select Show->History. The change set will appear in the History view. Right click on the change set and choose Discard... This will discard the change set from your workspace. So your workspace should now have all change from the stream *except* the one you want to remove. You can verify this by checking that your bad change set is the only thing you see Incoming. Right click on the component and choose "Replace in [your stream name]..." RTC (Jazz) : How to point your stream to different stream and take codes into your local: Example: you have local worskapce set up from dev stream, but now you have PATCH stream and want to take latest code. Go to ‘Pending Changes’ and select “Change Flow Target” to the required stream. How to remove namespace from xml file ? Step 1: ...
Hibernate - How to implement a 'Composite Key' : Suppose we have a Table in database which has many coulumns, among which two columns are PRIMARY KEY : UNIQUE_ID, NOTIFICATION_CHANNEL. We will write a separate Class which will contain these two columsn which are a part of COMPOSIT PRIMARY KEY. We will write a separate class for rest of the fields in that Table; and this class will also hold the reference of COMPOSIT PRIMARY KEY classs :->
Comments