Jayesh A Lalwani wrote:Once you have jars in your local maven repo, maven uses the jars from the local file system. It doesn't have to connect to the internet to get them again. You only need to download them once.
koilraj abraham wrote:I Agree with Tyson Lindner, You need to pass both OCAJP 7 and OCPJP 7 then only you will be certified as Oracle Certified Programmer, if you feel you don't want to take two exams then go for OCPJP 6.
Tyson Lindner wrote:
Ulf Dittmer wrote:
As Tyson said, the string is never set in Test2 instance used in Test3, so it is null. That has nothing at all to do with whether that field is static or non-static, the result would be the same in either case.
No, if str2 is static the output is always "this is a test2". A new object being initialized won't change the current static value back to the default value. To further answer OP's question, a static modifier means that when the value changes it changes for all instances of that object.
If you want to ensure that all objects have a non-static value that is the same, you have to iterate through every object and check/set that value.
Saif Asif wrote:Greetings ,
Personally I dont like the fact of putting hard coded paths inside my java classes. I put all such paths in a properties file and read them from the properties file. Secondly what problem are you facing ? I mean you specified the path as "/path/to/icons/icon_name.png" and java couldnt find the file ( threw a FileNotFoundException) or there is some other issue ?
Paul Clapham wrote:No, you don't. It's none of your business where the file was uploaded from.
However if you think it is, then go ahead and explain why.