Skip to content

Instantly share code, notes, and snippets.

View denizfurkan's full-sized avatar
💭
I may be slow to respond.

Furkan denizfurkan

💭
I may be slow to respond.
  • Ankara
View GitHub Profile
Arabanın Fiyatı : 76700.0 TL'dir
Arabanın %2.5 Indirimli Fiyatı : 74782.5 TL'dir
Arabanın Sadik Musteri Fiyatı : 71700.0 TL'dir
private void websocketConnection() {
//Get websocket from application
MyApplication app = (MyApplication ) getApplication();
mSocket = app.getSocket();
mSocket.on(Socket.EVENT_CONNECT, onConnect);
mSocket.on(Socket.EVENT_DISCONNECT, onDisconnect);
mSocket.on(Socket.EVENT_CONNECT_ERROR, onConnectError);
mSocket.on(Socket.EVENT_CONNECT_TIMEOUT, onConnectError);
mSocket.on("messageFromServer", onNewLocation);
mSocket.connect();
public class ValidationException extends Exception {
private String _message;
public ValidationException(String message){
_message = message;
}
@Override
public String getMessage() {
public class Main {
public static void main(String[] args) throws Exception {
PreCheck preCheck = new PreCheck("4543 5807 9574 0027");
preCheck.validation();
}
private static class PreCheck {
private String _cardNumber;
public class ValidationException extends Exception {
private String _message;
public ValidationException(String message){
_message = message;
}
@Override
public String getMessage() {
public class ValidationException extends Exception {
}
public void validation() throws ValidationException {
if(_cardNumber.contains("4543")){
System.out.println("Login Successful..");
}
else{
throw new ValidationException("Login Failed..");
}
}
public class Main {
public static void main(String[] args) throws Exception {
PreCheck preCheck = new PreCheck("4543 5807 9574 0027");
preCheck.validation();
}
private static class PreCheck {
private String _cardNumber;
try {
Integer[] array = new Integer[]{1, 2, 3};
System.out.println(array[2]);
}catch (Exception e){
System.out.println("Hata Oluştu");
}
finally {
System.out.println("Finally Bloğu Her Zaman Çalışır!");
}
try {
Integer[] array = new Integer[]{1, 2, 3};
System.out.println(array[5]);
}catch (Exception e){
System.out.println("Hata Oluştu");
}
finally {
System.out.println("Finally Bloğu Her Zaman Çalışır!");
}