In the previous post, we discussed on inner class for “one and only for” relationship among the classes. But static nested class not for same purpose, it is to add namespace to the class. It can be instantiated just with top class name (without top class instance). Static nested class is class scoped within another.
All posts by admin
Before start discussion on inner class, let us discuss simple analogy. Boat and Fin(Flipper). Fin exists only for boat an to help boat to move in river. Fin would not be useful if there is no boat. But Fin is not a boat or not an part of boat. But it shares special relationship “one
In the digital world, different types of database management system exist to manage the data. In these groups, Relational database management is popular and easy to manage organization transaction data. RDBMS to create, update, and administer a relational database. Relational database management systems use the SQL language to access and manage the database(DB). Relational Database:
Data is everywhere, it is growing in manifold. In this digital era, data must be stored in organized fashion for easy management and retrieval. Managing the enterprise information in digital format, helps us to improve the productivity and to get better insights from data. Enterprise data is massive and significant. We have to manage inventory,
Java coding practices recommended that maximum 80 characters in single line of the code. It is best for readability and understand the code. If our class require static members in more than 20 lines of our code and all lines are more than 80 characters in length, static import would help us to reduce the
Recently I had chance to meet my college junior, he said he started learning Java. I appreciated him for learning new programming skill. He is from C programming background, he said it is easy to learn java and he said java looks same like “C programming”. I was shocked. How he claims “Java programming same
Java methods accept parameters, execute business logic and return results. We can pass multiple argument to the methods and it return only one value from the methods. Some real time scenario, we may require to get more than one return values from single method. To get two return value from an method, one return value
Java encourages use of OOPS features such as inheritance and encapsulation. But in special cases, we want to restrict the change of our class or method or member variables or local variables. Here “final” keyword helps to mark the element initialized only once or design once and mark as complete. It is not allowed to
In the previous post, we discussed on creating the copy of object by clone() method. But one of main shortcome in the clone method is assigning value to final variables. Final variables can be assigned in declaration or in constructors. So your class has final members and copy of object required, it can’t be achieved
Previous post, we discussed on intention to create copy of object in java. In this post,we would discuss on different implementation of object copying. Before discuss on implementation, let us discuss on basic rule of clone copy implementation. 1) Copy of object and actual object should not refer at same object. If it is same,









