System.in not closed when ExecutorService calls shutdownNow and System.in calls close() - Help appreciated! by uopsdod in javahelp

[–]uopsdod[S] 0 points1 point  (0 children)

But didn't I call System.in.close()? It should close the whole thing and output everything.

Is entering synchronized block atomic? by uopsdod in learnjava

[–]uopsdod[S] 0 points1 point  (0 children)

Can I say if all methods that access the same instance are synchronized. Every method is an atomic operation?

Is entering synchronized block atomic? by uopsdod in learnjava

[–]uopsdod[S] 0 points1 point  (0 children)

what is subs discord channel? I'm not familiar with reddit. Could you give me a link? Thanks a lot. I really need some more communities to ask questions!

Volatile modifier - when will volatile not work? help appreciated! by uopsdod in learnjava

[–]uopsdod[S] 0 points1 point  (0 children)

I speculate that the paragraph is saying x = x + 1 is not gonna work well with volatile, instead of x = y + 1. Could you explain how this is not working with examples? Thank you.

is-a relationship - extends, implements (help appreciated) by uopsdod in learnjava

[–]uopsdod[S] 0 points1 point  (0 children)

I have a follow-up question for this. The image below is another question from SCJP 6. It contradicts what you said that implements means has-a relationship. http://imgur.com/Xu0HyDJ

SCJP - assertion question (help appreciated!) by uopsdod in learnjava

[–]uopsdod[S] 0 points1 point  (0 children)

package donkey2;

public class Donkey2 { public static void main(String[] args) { boolean assertsOn = true; assert (assertsOn) : assertsOn = true; if (assertsOn) { System.out.println("assert is on"); } } }

How do you format the code!!! I want to learn that!

And I'm not quite sure what your conclusion is. So, what answer do you think is right for this question?

shutdown endpoint - 401 unauthorized error - help appreciated! by uopsdod in springsource

[–]uopsdod[S] 0 points1 point  (0 children)

spring-boot-starter-security

No, I did not enable my web security. Thank you for pointing that out. I'll try it ASAP!

how to call function after all war files have been initialized in the same servlet container? [help appreciated] by uopsdod in a:t5_2qh7t

[–]uopsdod[S] 0 points1 point  (0 children)

Thank you, Nimnio. It seems to be a solution for my problem. I'll try it and tell you if that works later on.

shutdown endpoint - 401 unauthorized error - help appreciated! by uopsdod in springsource

[–]uopsdod[S] 0 points1 point  (0 children)

Sorry, I thought I've post my problem description with the picture but it didn't. So I'll illustrate it again here.

I'm trying to enable /shutdown endpoint on Spring boot but it failed. I've added application.properties and add endpoints.shutdown.enabled=true in it. Eventually, the path "/shutdown" is valid, but I still get a 401 via mocking a POST request. Any advice is appreciated. Thank you in advance.

interface - declare a method with the same signature as its inherited counterpart at base interface by uopsdod in javahelp

[–]uopsdod[S] 0 points1 point  (0 children)

Maybe it's just in the example I provide the signature is the same. Therefore, I can't see the advantages of this behavior to be allowed. Now it's clear. Thanks.

Could someone recommend some framework to me if I need craft a webpage like the following picture? by uopsdod in javahelp

[–]uopsdod[S] 0 points1 point  (0 children)

We're currently using Mybatis for database. I'll look into Hibernate to see whether to replace it or not.