Replace braces with semicolon

Answered

Is there any shortcut or way, to replace braces with semicolon. Just wondering if I got joked by someone or it was me accidentally using some kind of IntelliJ function. I'll provide an example of what I mean:

Replace this:

if(seat.getSeatNumber().equals(seatNumber)) {
requestSeat = seat;
break;
}

with: 

if(seat.getSeatNumber().equals(seatNumber));
requestSeat = seat;
break;

0
1 comment

Why would you want to do it? It will change the code logic.

0

Please sign in to leave a comment.