Posts

DirectionDraggablePolyLine on map v3

-------------Here is the Java script code for drawing draggable direction Polyline--------- This is the file containing direction polyline using wayPoints.......... using this you can draw your route with distance..see and use..it's really good. See the example... http://knowledgeserve.in/directionPolyLine.html  For any suggestion,  please either reply by post or mail us.

Java application to integrate Twitter-api

Image
  Twitter a microblogging service is getting more and more popular these  days. A lot of developers are involved to develop applications on its  API . Two weeks ago I click with a very basic idea and being as a matter of learning I started working on it. I have finished more than 80% of the work. I deployed the application on Google App Engine (I hope you are familiar with it). I used Twitter4J lib a Java wrapper for Twitter API. If you are also interested in Twitter based app development in Jave, then this tutorial will be helpful for you. Feel free to add comments at the end of the post, I will love to reply. Things you require for development Eclipse IDE Google App Engine SDK A Twitter account Twitter4J API java-twitter-0.9-SNAPSHOT.jar Things you need to know before you start ----------------------------------------------------------------------------------------------------------------------- Desktop java Application for integrating twitter-api System Requ...

Cloneable Interface::::Nucleous Software Java Interview Questions: Qu8

clone() and the Cloneable Interface in Java -------------------------------------------------------------------------------  The clone( ) method generates a duplicate copy of the object on which it is called. Only classes that implement the Cloneable interface can be cloned. The Cloneable interface defines no members. It is used to indicate that a class allows a bitwise copy of an object (that is, a clone ) to be made. If you try to call clone( ) on a class that does not implement Cloneable , a CloneNotSupportedException is thrown. When a clone is made, the constructor for the object being cloned is not called. A clone is simply an exact copy of the original. Cloning is a potentially dangerous action, because it can cause unintended side effects.  For example, if the object being cloned contains a reference variable called obRef, then when the clone is made, obRef in the clone will refer to the same object as does obRef in the original. If the clone makes a change to the cont...

wait | notify | notifyAll |Nucleous Software Java Interview Questions: Qu6

wait() | notify() | notifyAll() Multithreading replaces event loop programming by dividing your tasks into discrete and logical units. Threads also provide a secondary benefit: they do away with polling. Polling is usually implemented by a loop that is used to check some condition repeatedly. Once the condition is true, appropriate action is taken. This wastes CPU time. For example, consider the classic queuing problem, where one thread is producing some data and another is consuming it. To make the problem more interesting, suppose that the producer has to wait until the consumer is finished before it generates more data. In a polling system, the consumer would waste many CPU cycles while it waited for the producer to produce. Once the producer was finished, it would start polling, wasting more CPU cycles waiting for the consumer to finish, and so on. Clearly, this situation is undesirable. To avoid polling, Java includes an elegant interrocess communication mechanism via the ...

IBM Interview Questions: Serialization Vs Externalizable

Serialization Vs Externalizable One obvious difference that Serializable is a marker interface and doesn't contain any methods whereas Externalizable interface contains two methods: writeExternal(ObjectOutput) and readExternal(ObjectInput) . But, the main difference between the two is that Externalizable interface provides complete control to the class implementing the interface over the object serialization process whereas Serializable interface normally uses default implementation to handle the object serialization process . While implementing Serializable , you are not forced to define any method as it's a marker interface. However, you can use the writeObject or readObject methods to handle the serilaization process of complex objects. But, while implementing Externalizable interface, you are bound to define the two methods: writeExternal and readExternal and all the object serialization process is solely handled by these two methods only. In case of Serializable ...

Serilization| markup Interface | Nucleous Software Java Interview Questions: Qu6

What is serilization? How we implement it....Also what is the meaning of markup interface???? ------------------------------------------------------------------------------------------------ Answer1 : It's a mechanism in Java to ensure that the objects of classes implementing java.io.Serializable interface will have the capability of storing their states on a persistent storage that can be loaded back into the memory with the same state whenever needed. The Serializable interface is only a marker interface and has no methods or fields in it. It just serves the purpose of notifying the JVM about the Class implementing it that the Class may require to save its state on a persistent medium and subsequently may need to restore the same saved state in the memory when needed. The compiler handles it either by identifying serialVersionUID field in the class or by adding one to the class (the next post talks in detail about serialVersionUID) and presence of this field notifie...

Singleton class:::Nucleous Software Java Interview Questions: Qu7

What is Singleton Class: How will you make a class singloton.... ---------------------------------------------------------------------- Singleton class: This is a class which can be instatiated only once. Eg: Public class Singleton { private static single = new Singleton(); Private Singleton(); {} } For a singleton class, the constructor is made private and a static variable is used for instatiating the class.