Groovy - Write a Simple Junit Test Case Code Example

The code for Write a Simple Junit Test Case

class Example {
   static void main(String[] args) {
      Person per = new Person();
      per.name = "Alvin Alexander";
      per.age = 35;
      println(per.Display())
   } 
} 
 
public class Person {
   String name;
   int age;
	
   String Display() {
      return name +age;
   }  
}

/*
Output:
Alvin Alexander35
*/
Code by IncludeHelp, on August 9, 2022 15:35

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.