java - String cannot be converted to char, how to fix it? -


it says "incompatible types: string cannot converted char" how fix it? here example. code image

this solution :

public class newmain {     public static void main(string args[]) throws parseexception {         scanner s = new scanner(system.in);         char yes;         {             system.out.println("hi");             yes = s.next().charat(0);         } while (yes == 'y'); // if u enter 'y' continue      } } 

to exit enter thing other 'y'


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -