About 10,300,000 results
Open links in new tab
  1. Java Spring: How to use `@Value` annotation to inject an …

    Jan 31, 2013 · There are 17 ways to override a property value in spring boot, one of them is environment variables (Item 10. in the The only trick is that you have to convert property …

  2. Does Java support default parameter values? - Stack Overflow

    No, the structure you found is how Java handles it, (that is, with overloading instead of default parameters). For constructors, See Effective Java: Programming Language Guide's Item 1 tip …

  3. How do I use optional parameters in Java? - Stack Overflow

    Update: Java 8 includes the class java.util.Optional out-of-the-box, so there is no need to use guava for this particular reason in Java 8. The method name is a bit different though. Builder …

  4. What are the -Xms and -Xmx parameters when starting JVM?

    Feb 7, 2013 · The flag Xmx specifies the maximum memory allocation pool for a Java Virtual Machine (JVM), while Xms specifies the initial memory allocation pool. This means that your …

  5. java - How to correctly specify a default value in the Spring …

    May 26, 2017 · With #{} it is an expression, with ${} it is a placeholder for a value. The first expression you use will call a method/attribute on a bean called props, the one with the …

  6. java - Populating Spring @Value during Unit Test - Stack Overflow

    Jun 28, 2013 · Is there a way to use Java code inside my test class to initialize a Java class and populate the Spring @Value property inside that class then use that to test with? I did find this …

  7. How do I generate random integers within a specific range in Java ...

    Java 7+ In Java 1.7 or later, the standard way to do this (generate a basic non-cryptographically secure random integer in the range [min, max]) is as follows: import …

  8. How is the default max Java heap size determined?

    If I omit the -Xmxn option from the Java command line then a default value will be used. According to Java documentation "the default value is chosen at runtime based on …

  9. Is Java "pass-by-reference" or "pass-by-value"? - Stack Overflow

    Sep 3, 2008 · The terms "pass-by-value" and "pass-by-reference" are talking about variables. Pass-by-value means that the value of a variable is passed to a function/method. Pass-by …

  10. java - What's the default value of char? - Stack Overflow

    Jan 5, 2017 · The default value of a char attribute is indeed '\u0000' (the null character) as stated in the Java Language Specification, section §4.12.5 Initial Values of Variables .