Ten years Hello World,actually writing is life

简介: Ten years Hello World,actually writing is life
//LinJie
//Ten years Hello world,actually writing is life !
//Original
//First year
public class LinJie{
 public static void main(String[] args) {
   //hello world
   System.out.println("hello world");
 }
}
//Second years
public class LinJie{
 public static void main(String[] args) {
   //hello world
   LinJie obj = new LinJie();
   obj.toString();
 }
 /* (non-Javadoc)
  * @see java.lang.Object#toString()
  */
 @Override
 public String toString() {
   return "hello world";
 }
}
//The third year
public class LinJie{
 private static LinJie instance;
 public static LinJie getInstance() {
   if(instance == null)
     instance = new LinJie();
   return instance;
 }
 /* (non-Javadoc)
  * @see java.lang.Object#toString()
  */
 @Override
 public String toString() {
   return "hello world";
 }
 public static void main(String[] args) {
   //hello world
   LinJie obj = LinJie.getInstance();
   obj.toString();
 }
}
//Fourth years
public class LinJie{
 private final String a; //required
 private final String b; //required
 private final String c; //optional
 private final String d; //optional
 //Builder
 public static class Builder{
   //required
   private final String a;
   private final String b;
   //optional
   private String c;
   private String d;
   public Builder(String a,String b) {
     this.a = a;
     this.b = b;
   }
   public Builder c(String val)
     { c = val; return this; }
   public Builder d(String val)
     { d = val; return this; }
   public LinJie build() {
     return new LinJie(this);
   }
 }
 private LinJie(Builder builder) {
   a = builder.a;
   b = builder.b;
   c = builder.c;
   d = builder.d;
 }
 /* (non-Javadoc)
  * @see java.lang.Object#toString()
  */
 @Override
 public String toString() {
   return c+" "+d;
 }
 public static void main(String[] args) {
   //hello world
   LinJie obj = new LinJie.Builder("lin", "jie").
       c("hello").d("world").build();
   System.out.println(obj.toString());
 }
}
//Fifth years
/*
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="
       http://www.springframework.org/schema/beans
       http://www.springframework.org/schema/beans/spring-beans.xsd">
 <bean id="linjie" class="com.linjie.LinJie"></bean>
</beans>
*/
public class LinJie{
 @Test
 public void test() {
   //hello world
   ApplicationContext context = new ClassPathXmlApplicationContext
               ("applicationContext.xml");
   LinJie obj = (LinJie) context.getBean("linjie");
   obj.hello_world();
 }
 public void hello_world() {
   System.out.println("hello world");
 }
}
//Sixth years
/*
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xmlns:aop="http://www.springframework.org/schema/aop"
   xmlns:context="http://www.springframework.org/schema/context"
   xsi:schemaLocation="http://www.springframework.org/schema/beans
    http://www.springframework.org/schema/beans/spring-beans.xsd
       http://www.springframework.org/schema/aop
       http://www.springframework.org/schema/aop/spring-aop-4.0.xsd
       http://www.springframework.org/schema/context
       http://www.springframework.org/schema/context/spring-context-4.0.xsd">
   <!-- 扫描 -->
 <context:component-scan base-package="com.linjie.aop">
   </context:component-scan>  
</beans>
*/
@Component("linjie")
public class LinJie{
 @Test
 public void test() {
   //hello world
   ApplicationContext context = new ClassPathXmlApplicationContext
               ("applicationContext.xml");
   LinJie obj = (LinJie) context.getBean("linjie");
   obj.hello_world();
 }
 public void hello_world() {
   System.out.println("hello world");
 }
}
//Seventh years
/*
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xmlns:aop="http://www.springframework.org/schema/aop"
   xmlns:context="http://www.springframework.org/schema/context"
   xsi:schemaLocation="http://www.springframework.org/schema/beans
    http://www.springframework.org/schema/beans/spring-beans.xsd
    http://www.springframework.org/schema/aop
    http://www.springframework.org/schema/aop/spring-aop-4.0.xsd
    http://www.springframework.org/schema/context
    http://www.springframework.org/schema/context/spring-context-4.0.xsd">
 <context:component-scan base-package="com.linjie.aop">
   </context:component-scan>  
 <aop:aspectj-autoproxy></aop:aspectj-autoproxy>  
</beans>
*/
/*
@Component("arithmetic")
public class Arithmetic {
 public void hello_world() {}
}
*/
@Aspect
@Component("linjie")
public class LinJie{
 @Test
 public void test() {
   //hello world
   ApplicationContext context = new ClassPathXmlApplicationContext
               ("applicationContext.xml");
   LinJie obj = (LinJie) context.getBean("linjie");
   obj.hello_world();
 }
 @Before("execution(* com.linjie.aop.Arithmetic.*(..))")
 public void Before_Loggin() {
   System.out.println("hello world");
 }
}
//Eighth years fail
//Ninth years fail
//Tenth years
public class LinJie {
 public static void main(String[] args) {
   String grow       = "hello world";
   String grow_up    = "hello world";
   String grow_up_up = "hello world";
   if(grow.equals(grow_up) && grow.equals(grow_up_up))
     System.out.println(grow);
 }
}


相关文章
|
机器学习/深度学习 编解码 人工智能
Reading Notes: Human-Computer Interaction System: A Survey of Talking-Head Generation
由于人工智能的快速发展,虚拟人被广泛应用于各种行业,包括个人辅助、智能客户服务和在线教育。拟人化的数字人可以快速与人接触,并在人机交互中增强用户体验。因此,我们设计了人机交互系统框架,包括语音识别、文本到语音、对话系统和虚拟人生成。接下来,我们通过虚拟人深度生成框架对Talking-Head Generation视频生成模型进行了分类。同时,我们系统地回顾了过去五年来在有声头部视频生成方面的技术进步和趋势,强调了关键工作并总结了数据集。 对于有关于Talking-Head Generation的方法,这是一篇比较好的综述,我想着整理一下里面比较重要的部分,大概了解近几年对虚拟人工作的一些发展和
|
8月前
|
人工智能
Big Water Problem
Big Water Problem
35 0
Data Structures and Algorithms (English) - 7-10 Saving James Bond - Easy Version(25 分)
Data Structures and Algorithms (English) - 7-10 Saving James Bond - Easy Version(25 分)
67 0
ZOJ - Problem Set - 3960 What Kind of Friends Are You?
ZOJ - Problem Set - 3960 What Kind of Friends Are You?
64 0
ZOJ - Problem Set - 3960 What Kind of Friends Are You?
|
数据库
When Tech Meets Love – Smarter Ways to NOT be Single
It’s that time of year again. Single’s Day (a.k.a Double 11) is just around the corner, people buying gifts for loved ones.
1585 0
When Tech Meets Love – Smarter Ways to NOT be Single