This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ValidationException extends Exception { | |
private String _message; | |
public ValidationException(String message){ | |
_message = message; | |
} | |
@Override | |
public String getMessage() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ValidationException extends Exception { | |
private String _message; | |
public ValidationException(String message){ | |
_message = message; | |
} | |
@Override | |
public String getMessage() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ValidationException extends Exception { | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void validation() throws ValidationException { | |
if(_cardNumber.contains("4543")){ | |
System.out.println("Login Successful.."); | |
} | |
else{ | |
throw new ValidationException("Login Failed.."); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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!"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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!"); | |
} |
NewerOlder