Skip to content

Instantly share code, notes, and snippets.

public class PairMultiParamter<K,V>
{
K key;
V val;
public PairMultiParamter(K key, V val) {
super();
this.key = key;
this.val = val;
}
public K getKey() {
public static <T extends Comparable<T>> int countGreaterThan(T[] anArray, T elem) {
int count = 0;
for (T e : anArray)
if (e.compareTo(elem) > 0)
++count;
return count;
}
//////////
Integer[] arr= new Integer[3];
arr[0]=5;
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
response.setStatus(200);
response.getWriter().write("ALLAH KAREEM");
}
//////
$("#b1").click(function(){
$.post("/jquery/MySer",
{
name: "Donald Duck",
city: "Duckburg"
@RequestMapping(value = "/sendEmail", method = RequestMethod.GET)
public String sendEmail(Model model)
{
try {
ReadDataForEmailsImpl rDFEmail = new ReadDataForEmailsImpl(); //// thread for read data
SendEmail sendEmail = new SendEmail() ; //// thread for send data
rDFEmail.start();
sendEmail.start();
public static void acceptObejct(Object ob)
{}
public static void printList(List<Object> list)
{ }
/// Main methods calling.
Integer a=90;
acceptObejct(a); // ok , not exception
////
public class User implements Serializable {
/**
*
*/
private static final long serialVersionUID = 1L;
/*
* primary key user id
*/
@Column(name = "user_id", nullable = false)
@Basic(fetch = FetchType.LAZY)
@Column(name = "craftcms_id")
@Basic(fetch = FetchType.LAZY)
@XmlElement
String craftcms_id ;
public class Country
{ String name ;
// getter and setter
@Override
public String toString() {
return "Country [name=" + name + "]"; }
}
public class GenMethd {
public static <T> boolean getGenrcs(T t)
{
RawType<Integer> rawBox = new RawType();
rawBox.setT( 112);
Integer a = rawBox.getT();