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

📄 choiceformatresources.java

📁 its a kind of tutorial.
💻 JAVA
字号:
// Filename ChoiceFormatResources.java.
// English (UK) resources for the ChoiceFormatDemo program.
//
// Written for JI book, Chapter 9 see text.
// Fintan Culwin, v 0.2, August 1997.


import java.util.ListResourceBundle;
import java.text.*;

public class ChoiceFormatResources extends ListResourceBundle { 

static final double[]     limits = {0,1,2};

static final String       initialPhrases[]  = {"There were ",
                                               "There was ",
                                               "There were "};
static final ChoiceFormat initialFormatter  = 
                                 new ChoiceFormat( limits, initialPhrases);  

static final String       finalPhrases[]  = {" transactions",
                                             " transaction",
                                             " transactions"};
static final ChoiceFormat finalFormatter  = 
                                  new ChoiceFormat( limits, finalPhrases);  

   static final Object[][] contents = {    
      { "initialFormatter", initialFormatter },  
      { "finalFormatter",   finalFormatter   }        
   }; // End contents.
                                     
   public Object[][] getContents() { 
      return contents;   
   } // End getContents.
} // End class ChoiceFormatResources.

⌨️ 快捷键说明

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