TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Simple Swapping program in Java
Alagunila Meganathan
Aug 08
2016
Code
529
0
0
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
expand
Swap.rar
public
class
Swapping {
static
void
swap(
int
i,
int
j){
int
temp=i;
i=j;
j=temp;
System.out.println(
"i = "
+ i +
" j = "
+ j);
}
public
static
void
main(String[] args){
int
i=
1
;
int
j=
2
;
swap(i,j);
}
}
java
swapping