what's the difference between try and class in java?
i want to know what's the difference between public or private class and try, and when do i have to use one of them and not the other? 

'try { 
					   
	                date1 = sdf.parse(duration);
	                date2 = sdf.parse(Time2);
	                long diff = date1.getTime() - date2.getTime();
	                
	                if(diff > 0){
	                long jour = diff/(60*24*60*1000);
	                int jor = (int)jour;
	                String jr = Integer.toString(jor);
	                long heur = (diff%(60*24*60*1000))/(60*60*1000);
	                int her = (int)heur;
	                String hr = Integer.toString(her);
	                long minu = ((diff%(60*24*60*1000))%(60*60*1000))/(60*1000);
	                int mi = (int)minu;
	                String mn = Integer.toString(mi);
	                TAG_FINAL_TIME =  jr + "j" + " " + hr + "h" + " "+  mn + "min";
	                	                }
	               else{
	                	int i1 = 0;
	                	String I = Integer.toString(i1);
	                	TAG_FINAL_TIME = I; }
	                 fintime =  TAG_FINAL_TIME;
	              } catch (ParseException e) {
	                e.printStackTrace();
	              }'
what's the difference between try and class in java?
===

i want to know what's the difference between public or private class and try, and when do i have to use one of them and not the other? 

'try { 
					   
	                date1 = sdf.parse(duration);
	                date2 = sdf.parse(Time2);
	                long diff = date1.getTime() - date2.getTime();
	                
	                if(diff > 0){
	                long jour = diff/(60*24*60*1000);
	                int jor = (int)jour;
	                String jr = Integer.toString(jor);
	                long heur = (diff%(60*24*60*1000))/(60*60*1000);
	                int her = (int)heur;
	                String hr = Integer.toString(her);
	                long minu = ((diff%(60*24*60*1000))%(60*60*1000))/(60*1000);
	                int mi = (int)minu;
	                String mn = Integer.toString(mi);
	                TAG_FINAL_TIME =  jr + "j" + " " + hr + "h" + " "+  mn + "min";
	                	                }
	               else{
	                	int i1 = 0;
	                	String I = Integer.toString(i1);
	                	TAG_FINAL_TIME = I; }
	                 fintime =  TAG_FINAL_TIME;
	              } catch (ParseException e) {
	                e.printStackTrace();
	              }'