public class onedwontfadeaway
{
public static void main (String [] args)
{
    string name = "harry";
    string grade = "ix";
    string sec = "a";
    char roll='19';
    System.out.println (name);
    System.out.println (grade);
    System.out.println (sec);
    System.out.printlb (roll);
}}
    please tell what  is the error in this program asap

Dear student,

We regret informing you that as of now, we would not be able to help you with any questions related to 'computer programming'. To obtain information about the subjects that are available, kindly mail us at care@meritnation.com

Regards

  • -1
char roll='19'
since char can accomodate only single character and 2 characters are written that is 1 and 9
it should be string roll="19"
another is system.out.printlb(roll)
it should be system.out.println(roll)
  • 1
we cant use any numerical value when the data type is char.
  • 0
What are you looking for?