Tim Holloway wrote:Stored procedures are something that I recommend avoiding where possible regardless of the framework you are using. Stored procedures tend to lock you into a particular database vendor plus they make it harder to determine where business data logic resides - on the DBMS server or in application code, thus raising time and cost of system maintenance. Plus it's generally harder to keep version control over stored logic than it is for application code.
The main reasons for using stored procedures would be in cases where performance was prohibitively worse when doing database logic in application code or the same logic needed to be shared between multiple applications. Both conditions are typically pretty rare.
Spring Boot really doesn't impact this. If Hibernate is being inefficient, then it's Hibernate you need to tune and that process is the same for Spring Boot as for regular Spring or even non-Spring apps.
Norm Radder wrote:
1. Prints: MyThread: run() followed by MyRunnable: start()
Do you mean this is what the output should look like:
Add @Override before the start methods to see which ones actually are overriding a class method.
Liutauras Vilda wrote:I'm not sure whether the code is copied exactly as it should, but none of the answers are inline with an existing code.
Liutauras Vilda wrote:1. You can't have two public classes in the same source file. You have MyThread and myTest.
2. Source filename should match the public class's name.
Try to fix those and see how it goes then.
guranteed constraint :
2 ≤ m ≤ 100.
Houssam El wrote:I hope the following explanation will help you to perceive HashTable properties.
1-TableEntry<T> is an API that defines operations of the HashTable class, in other words, API is a tool used by the HashTable class, furthermore, we should implement TableEntry<T> interface in the HashTable class in order to override its methods, as the following example shown
The error that you've faced while using the get() method, is thrown because the get() method is neither defined on TableEntry<T> interface nor HashTable class, that's why the error is raised at compile-time, you would define it in the TableEntry interface, thus, the IDE will ask you automatically to override it in the HashTable class.
NB: your implementation or usage of HashTable may thrown a key collision key (quadratic probing), and you should re-hash it again as you did the first time
Paul Clapham wrote:If you're trying to write your own implementation of Java's Hashtable class, then you should realize that as a map, a table entry has a key and a value. So for a start you should be implementing
As for your existing code, you can't call a get(int) method on your Hashtable<T> class simply because you didn't write one.