Tuesday, July 14, 2020

Java Program To Display All Alternate Characters From A to Z


class Char3

{

 char ch;

int i;

void take()

{

 for(i=65;i<=90;i=i+2)

{

ch=(char)(i);

System.out.print(“ “+ch);

}

public static void main(String args[])

{

Char3 ob=new Char3();

ob.take ();

}

}


No comments:

Post a Comment

Subscribe via email

Enter your email address:

Delivered by FeedBurner