for this code I need to set string d to char c, can anyone tell me how to do it?
public static void main(String[] args)
{
int n;
int m;
String d;
char c;
Scanner sc = new Scanner(System.in);
System.out.println("Input Integer: ");
//get the value
n=sc.nextInt();
int answer = sum_upto(n);
System.out.println("sum of numbers from 1 to n: " + answer);
System.out.println("input a character and two integers: ");
//get the values
d=sc.next();
n=sc.nextInt();
m=sc.nextInt();
d.charAt(0);
System.out.println(writeBlock(c, m, n));
}