What is a Question Mark “?” and Colon “:” Operator Used for?

This is the ternary conditional operator, which can be used anywhere, not just the print statement. It’s sometimes just called “the ternary operator”, but it’s not the only ternary operator, just the most common one. Here’s a good example from Wikipedia demonstrating how it works: A traditional if-else construct in C, Java and JavaScript is written: This … Read more

What does ‘SSSXXX’ mean in a java simple date format object?

I’ve found this in some legacy code that I don’t understand. Does anyone know what the SSSXXX bit means, it seems to be adding 2 hours to my date!? Answer: According to the API S refers to milliseconds and X to the timezone. The “Examples” section contains an example of SSSXXX yielding a three-digit millisecond representation followed by a “full” timezone offset … Read more

What is WEB-INF used for in a Java EE web application?

The Servlet 2.4 specification says this about WEB-INF (page 70): A special directory exists within the application hierarchy named WEB-INF. This directory contains all things related to the application that aren’t in the document root of the application. The WEB-INF node is not part of the public document tree of the application. No file contained in the WEB-INF directory may be served directly … Read more

Check jdk/JRE is installed and get path for jvm.dll

Java can be installed anywhere, and there is no guarantee that you should be able to see, where. So, the general answer to your question, is “it is impossible”, or that “you had to run a recursive file search for jvm.dll on your whole filesystem”. But this is not, what you want. I think, you want to get a … Read more

Problems with setting the classpath in ant

I think the problem is with your classpath path declaration. The build directory should be a <pathelement> Also, I would only include 3-rd party jars in your classpath refid. So the whole block looks like. Also, as DroidIn.net has pointed out, you should create a package for you program.

ClassNotFoundException: org.slf4j.LoggerFactory

Try downloading jar from here You can find, it holds the class you need. EDIT Seems like the website has changed its structure. You need to choose which jar file you need for your project. For slf4j-api jar file for latest version as of now, please visit this link For slf4j-simple jar file for latest version as of now, please visit this … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)