Skip to content

Instantly share code, notes, and snippets.

View SaBenBurra's full-sized avatar

Buğra SaBenBurra

View GitHub Profile
public interface IPushNotificationService {
public boolean sendNotificationToSingleUser(String data, String clientId);
public boolean sendNotificationToAllUsers(String data);
}
public class Main {
public static void main(String[] args) {
FirebasePushNotification notificationService = new FirebasePushNotification();
notificationService.sendNotificationToSingleUser("Hello", "123456");
notificationService.sendNotificationToAllUsers("Hello world");
//...
notificationService.sendNotificationToSingleUser("Hello", "123456");
notificationService.sendNotificationToAllUsers("Hello world");
public class FirebasePushNotification {
public boolean sendNotificationToSingleUser(String data, String clientId) {
//işlemler
}
public boolean sendNotificationToAllUsers(String data) {
//işlemler
}
}
public class Main {
public void main(String[] args) {
SampleClass myObject1 = new SampleClass(5);
SampleClass myObject2 = myObject1;
myObject2.number = 20;
System.out.println(myObject1.number);
}
}
public class SampleClass {
int number;
public SampleClass(int number) {
this.number = number;
}
}
public class Main {
public static void main(String[] args) {
int number1 = 5;
int number2 = 10;
number1 = number2;
number2 = 15;
System.out.println(number1);
}
}