Java Code Examples for sun.jvm.hotspot.HelloWorld

Following code examples demonstrate how to use sun.jvm.hotspot.HelloWorldfrom java. These examples are extracted from various highly rated open source projects. You can directly use these code snippets or view their entire linked source code. These snippets are extracted to provide contextual information about how to use this class in the real world. These samples also let you understand some good practices on how to use sun.jvm.hotspot.HelloWorldand various code implementation of this class.

    public static void main(String[] args) {

        int n = 10;

        System.out.println(HelloWorld.fib(n));

        testRecursive(n);

        testCalcWithoutRecursion(n);
    } 


    public static void main(String[] args) throws ClassNotFoundException, IllegalAccessException, InstantiationException {
        ClassLoader loader = HelloWorld.class.getClassLoader();
        System.out.println(loader);
        Class.forName("com.example.demo.Test2", true, loader);

        System.out.println(HelloWorld.fib(10));

        List<Test2> list = new ArrayList<>();
        for(long i=0; i< Long.MAX_VALUE; i++) {
            list.add(new Test2());
        }


    } 

    public static void main(String[] args) {

        ApplicationContext context =
                new ClassPathXmlApplicationContext("beans.xml");

        HelloWordService service =
                (HelloWordService) context.getBean("helloWorldService");

        HelloWorld hw= service.getHelloword();

        hw.sayHello();
    } 

    public void testSayHello(){
        HelloWorld helloWorld=new HelloWorld();

        System.out.println("Hello World!");
    } 

	public static void main(String[] args) throws MalformedURLException {
		Service service = Service.create(new URL(ADDRESS),SERVICE_NAME);
        IHelloWorld hw = service.getPort(IHelloWorld.class);

		String str = hw.sayHi("Hello");
        System.out.println(str);

        int date = hw.checkTime(new Date());
        System.out.println(date);

	} 

Advertisement
Advertisement