Topic: String
Given a string name, e.g. "Bob", return a greeting of the form "Hello Bob!".
helloName("Bob") → "Hello Bob!"
helloName("Alice") → "Hello Alice!"
helloName("X") → "Hello X!"
SAG Academy Forum | Top and Best Forums | Online Discussion Sites
A place to ask, post and discuss queries of IT and non-IT professional courses like PHP, Java, .Net, web designing, SEO, Android and iPhone app development.
You are not logged in. Please login or register.
Given a string name, e.g. "Bob", return a greeting of the form "Hello Bob!".
helloName("Bob") → "Hello Bob!"
helloName("Alice") → "Hello Alice!"
helloName("X") → "Hello X!"
public String helloName(String name)
{
return "Hello "+name+"!";
}
Copyright 2015-16 © SAG Infotech Pvt Ltd. All Rights Reserved.