How to check/uncheck checkbox using jQuery? Example Tutorial

In the last couple of articles, I have shared a couple of useful jQuery tips e.g. reloading web page and working with tag selectors, today, I'll show you how to check or uncheck a particular checkbox using jQuery. If you remember, in HTML a checkbox is checked if the "checked" attribute is present and its value is not false, otherwise, it's unchecked. By using jQuery function prop() we can dynamically add this attribute or if present we can change its value i.e. checked=true to make the checkbox checked and checked=false to mark the check box unchecked. Though you should remember that prop() function is only available from jQuery 1.6 version and if you are running on lower jQuery version then you can also use attr() to check/uncheck a particular checkbox.

Top 50 Java Programs from Coding Interviews

Coding is an integral part of any programming job interviews Java development interviews are no exception. I would even suggest you should never hire anyone without testing their coding skill, coding is also an art and more often than a good code is a good developer as well. If you look at tech giants like Amazon, Facebook, and Google they thoroughly test the coding skill of any developer they hire, particularly Amazon who first send online coding exercises to filter Java programmers who can code. This online test usually gives you requirements and ask you write a program in limited time usually 2 to 3 hours. The program should meet the output given by the exercise itself. These type of exercises are very tough to crack if you don't have a good coding skill.

Arithmetic overflow error converting numeric to data type numeric in SQL Server

This error comes when you try to store an out-of-range floating point value into a numeric variable. For example, if your NUMERIC or DECIMAL variable is defined as NUMERIC(5,2) than the maximum value it can hold is 999.99, if you try to store something like 1000.00 then it will throw "Arithmetic overflow error converting numeric to data type numeric". One of the common reason of this error is the ignorance and misunderstanding of the NUMERIC data type. For example, many SQL Server DBAs and developers think that a NUMERIC(5,2) variable can hold a 7 digit floating point number where 5 digit is before decimal and 2 digits are after the decimal. This is wrong. A NUMERIC(5,2) means, the total number of digits in the value cannot exceed 5 and decimal precision is 2 digits i.e. the maximum possible value is 999.99.

How to reload/refresh a page using JavaScript and jQuery

JavaScript provides several ways to reload or refresh an HTML page but the standard way to do this job is by using window.location object. This object provides a reload() method which instructs the browser to reload the page. The browser can do it from its cache or from the server, which depends upon optional parameter i.e. reload(true) will reload the page from the server but reload(false) will only reload the page from browser's cache, which may or may not represent the current version at the server.

Is it possible to have an abstract method in a final class?

This is one of the interesting core Java questions which was asked to one of my readers recently during a telephonic interview for Java developer job interview. Even though he knows that you cannot make an abstract class final in Java, he got confused by the wording of the methods. The answer is simple, No, it's not possible to have an abstract method in a final class in Java. Why? because as soon as you declare an abstract method in a Java class, the class automatically becomes an abstract class and you cannot make an abstract class final in Java as discussed before, hence it's not possible to have an abstract method in a final class in Java.

Does Spring Certification help in Job and Career? Why become Pivotal Certified Spring Professional?

One of the frequently asked question among Java and Spring developer is whether Spring certification is valuable? or does Spring Certification help you in Job and Career? These questions are not very different from what Java developer ask about Oracle's Java certification (see here). The short answer to these question is Yes, Spring Certifications are very valuable and it not only provides Industry recognition for your knowledge, experience, and skill but also set you apart from the millions of Java and Spring developer who are not certified. Of course, as with any certification, the most valuable part, apart from recognition is the learning process and this is true for Spring certifications as well.