This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Svelte and Sapper in Action and have Mark Volkmann on-line!
See this thread for details.
Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!

Vishwa Bhat

+ Follow
since Jun 15, 2017
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Vishwa Bhat

One more thing to note here would be that the deleteById() method works fine and deletes the record, but delete fails with no error or exceptions.
Hi All,

Topic : Hibernate CrudRepository delete function is not working.


I have the code here:

Instructor has a one to one unidirectional relation with InstructorDetail as shown below:

In my SpringBoot Application class I am saving the entity and deleting the same.

The save is working, but the delete is not. I still have that entry in my mySQL database. There is no error/exception.


1. Why is the delete not working?
2. Every time I run the program(application class) why is a new record not created in the Instructor and InstructorDetail table ?

Thanks in advance.
[GP: Deleted unnecessary quoted part to make the post more concise and readable for others]

Got it now. I was declaring a class but this question was talking about a file. Thanks a lot man
2 years ago
Question: Examine the following content of Java source code and select the correct options:

a. A Javasource code file cannot define multiple interfaces.
b. A Javasource code  file can only define multiple classes
c. A Javasource code file can define multiple interfaces and classes.
d. The previous class will fail to compile.

The book states that the options a and b are incorrect. Also that the options c and d are correct.
2 years ago
Thanks a lot guys.

Just started this OCA Java SE 8 by Mala Gupta and started solving the Twist in the Tale 1.1. and 1.2.

Both of these pertain to declaring public interface or a public class  inside a class with another name. According to the book this should not be allowed because if there is a class named Class1 the only public interface that can be allowed inside it is a public interface Class1 or the only public class that can be allowed inside it is public class interface1. Also a public class can only have one of public interface or public class inside it.

But when I compiled the code on eclipse and in some online java compilers it does not throw an error at all for any of these conditions.

This is troubling me a lot since this is start and I am stuck here itself.
2 years ago
Hi Guys,

I was going through the OCA Java SE 8 certification and found the following question about interface.

The correct option pointed out that declaring a public interface in a public class with another name would result in a compilation error in Java 8. But when i compiled this code in eclipse using Java 8 this did not give me any compilation errors.

Is this allowed? and is the option given in the book incorrect?

2 years ago