examples: adjust comment (#6314)

This commit is contained in:
Steve Rao 2019-10-23 06:45:42 +08:00 committed by Jihun Cho
parent 2eb3f8c34e
commit d1411b205c
4 changed files with 12 additions and 8 deletions

View File

@ -78,12 +78,13 @@ public final class HelloJsonClient {
* greeting.
*/
public static void main(String[] args) throws Exception {
// Access a service running on the local machine on port 50051
HelloJsonClient client = new HelloJsonClient("localhost", 50051);
try {
/* Access a service running on the local machine on port 50051 */
String user = "world";
// Use the arg as the name to greet if provided
if (args.length > 0) {
user = args[0]; /* Use the arg as the name to greet if provided */
user = args[0];
}
client.greet(user);
} finally {

View File

@ -73,12 +73,13 @@ public class CompressingHelloWorldClient {
* greeting.
*/
public static void main(String[] args) throws Exception {
// Access a service running on the local machine on port 50051
CompressingHelloWorldClient client = new CompressingHelloWorldClient("localhost", 50051);
try {
/* Access a service running on the local machine on port 50051 */
String user = "world";
// Use the arg as the name to greet if provided
if (args.length > 0) {
user = args[0]; /* Use the arg as the name to greet if provided */
user = args[0];
}
client.greet(user);
} finally {

View File

@ -75,12 +75,13 @@ public class CustomHeaderClient {
* Main start the client from the command line.
*/
public static void main(String[] args) throws Exception {
// Access a service running on the local machine on port 50051
CustomHeaderClient client = new CustomHeaderClient("localhost", 50051);
try {
/* Access a service running on the local machine on port 50051 */
String user = "world";
// Use the arg as the name to greet if provided
if (args.length > 0) {
user = args[0]; /* Use the arg as the name to greet if provided */
user = args[0];
}
client.greet(user);
} finally {

View File

@ -70,12 +70,13 @@ public class HelloWorldClient {
* greeting.
*/
public static void main(String[] args) throws Exception {
// Access a service running on the local machine on port 50051
HelloWorldClient client = new HelloWorldClient("localhost", 50051);
try {
/* Access a service running on the local machine on port 50051 */
String user = "world";
// Use the arg as the name to greet if provided
if (args.length > 0) {
user = args[0]; /* Use the arg as the name to greet if provided */
user = args[0];
}
client.greet(user);
} finally {