java - I would like to know how to insert my name into a message. eg:“xxx is taking the course CSCP1014" -
//this program prints welcome april semester 2014! public class april { public static void main (string [] args) { system.out.println("welcome april semester 2014!"); } }
not sure intention is, maybe aiming for:
import java.util.scanner; public class test { public static void main(string[] args) { string name; scanner kb = new scanner(system.in); system.out.println("please enter name: "); name = kb.next(); system.out.println(name + " taking course csp1014"); } }
Comments
Post a Comment