⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 testobject.java

📁 Eclipse代码生成器,支持Eclipse3.3 WTP版本,该项目实现了Spring + hibernate + webService + struts 框架文件的自动生成,有这方面需求的个人公司
💻 JAVA
字号:
package com.newegg.test;

import java.util.Arrays;
import java.util.Collections;
import java.util.List;

public class TestObject
{
	private String name;
	private int price;

	public TestObject ( String name , int price )
	{
//		System.out.println(TYPE_NAMES.getClass().getName());
//		for (int i = 0; i < TYPE_NAMES.size(); i++)
//		{
//			String array_element = (String)TYPE_NAMES.get(i);
//			System.out.println(array_element);
//			
//		}
		this.name = name;
		this.price = price;		
	}

	// JavaBean properties
	// Note that public fields are not visible directly;
	// you must write a getter method for them.
	public String getName()
	{
		return name;
	}

	/**
	 * @param name
	 *            the name to set
	 */
	public void setName(String name)
	{
		this.name = name;
	}

	/**
	 * @param price
	 *            the price to set
	 */
	public void setPrice(int price)
	{
		this.price = price;
	}

	public int getPrice()
	{
		return price;
	}

	// A method
	public double sin(double x)
	{
		return Math.sin(x);
	}

	public static final List TYPE_NAMES = Collections.unmodifiableList(Arrays.asList(new String[]
	{ "UNKNOWN", "TIME", "DATE", "DATETIME" }));
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -