Can we declare a class as static?

We can’t declare a top-level class as static however an inner class can be declared as static. If inner class is declared as static, it’s called static nested class.Static nested class is same as...

solved
java 1 Answer 15 views asked 3 days ago in Technology by muneshs16

What is static keyword?

static keyword can be used with class level variables to make it global i.e all the objects will share the same variable. static keyword can be used with methods also. A static method can access...

solved
java 1 Answer 12 views asked 3 days ago in Technology by muneshs16

Disadvantages of using scriptlet?

There are several articles on the web comparing scrptlets and JSTL (I guess you've googled for some first) and most of them will tell you the sameJSTL are easier to test, maintain and readJSTL can be...

solved
java 1 Answer 30 views asked 5 days ago in Technology by muneshs16

What is a Spring “stereotype”?

The following stereotype annotations in 2.5 can be used in a Spring MVC application as an alternative to wiring the beans in XML:@Repository - for DAO beans - allows you to throw DataAccessException...

solved
java 2 Answer 46 views asked Aug 15 in Technology by muneshs16

Avoiding != null statements

Only for this situation - Avoiding checking for null before a string compare:if ( foo.equals("bar") ) { // ...}will result in a NullPointerException if foo doesn't exist.You can avoid that if...

solved
java 1 Answer 35 views asked Aug 13 in Technology by muneshs16

how to Avoid Deadlock with an example

Deadlock is a permanent blocking of a set of threads that are competing for a set of resources. Just because some thread can make progress does not mean that there is not a deadlock somewhere...

solved
java 2 Answer 36 views asked Aug 13 in Technology by muneshs16

Spring MVC - How does @Autowired work?

You just need to annotate your service class UserServiceImpl with annotation@Service("userService")Spring container will take care of the life cycle of this class as it register as service.Then in...

solved
java 2 Answer 46 views asked Aug 5 in Technology by LogenRahul