What is difference between Comparable and Comparator interface 1) Comparable interface is in java.lang package Comparator interface is in java.util package ================================ 2) int compareTo(Object o1) method takes input as only object int compare(Object o1, Objecto2) method takes input as 2 object ================================ 3) java.lang.Comparable: int compareTo(Object inuptObject1) This method compares this object with inputObject1. Returned int value has the following meanings. 1. positive (this) object is greater than inuptObject1 2. zero (this) object equals to inuptObject1 3. negative (this) object is less than inuptObject1 java.util.Comparator: int compare(Object object1, Object object2) This method compares object1 and object2 objects. Returned int value has the following meanings. 1. positive object1 is greater than object2 2. zero ...
Struts key points which I learned for an interview. Its My Notes Home ============================================================================= What is the disadvantage of DispatchAction ============================================================================= The main constraint in the DispatchAction is the method name in the action class and the button name in the jsp page should be the same. But in LookupDispatchAction, we can have different names for the buttons and the methods. Home ============================================================================= What is LookupDispatchAction in struts ============================================================================= Steps 1) Your action class has to extends to LookupDispatchAction 2) You have to implement protected Map getKeyMethodMap() public class UserAction extends LookupDispatchAction { protected Map getKeyMethodMap() { Map map = new HashMap(); map.put("UserEmployeeForm.add", ...
JMeter Tutorial Apache JMeter Apache JMeter is open source software , a 100% pure Java desktop application designed to load test functional behavior and measure performance. Advantage 1) Apache JMeter may be used to test performance both on static and dynamic resources like 1) files 2) Servlets 3) Perl scripts 4) Java Objects 5) Data Bases and Queries 6) FTP Servers . 2) JMeter can be used to simulate a heavy load on a server, network or object to test its strength or to analyze overall performance under different load types. 3) Can load and performance test many different server types: 1) Web - HTTP, HTTPS 2) SOAP 3) Database via JDBC 4) LDAP 5) JMS 6) Mail - POP3(S) and IMAP(S) 4) Complete portability and 100% Java purity . 5) Full multithreading framework allows concurrent sampling by many threads 6) Careful GUI design allows fas...
Comments
Post a Comment