public static void deleteActivity(int id) { // make a new variable of type SomerenModel.Activities in order to store data to it SomerenModel.Activities newActivity = new SomerenModel.Activities(); // store data to the newActivity variable newActivity.setId(id); // passing data to the DB layer SomerenDB.DB_deleteActivity(newActivity); }