C++ Exercises(十二)

钱能《C++程序设计教材》P14
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

日期数据存在在文件abc.txt中,格式如下面所示,若年,月,日加起来等于15,则收集,然后按日期从小到大的顺序打印出来

Sample Input:

None.gif 03 - 11 - 12
None.gif
03 - 08 - 12
None.gif
04 - 08 - 11
None.gif
02 - 07 - 06

Sample Output:

<?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" /><chsdate year="2003" month="08" day="04" islunardate="False" isrocdate="False" w:st="on"><span style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: 'Times New Roman'"></span></chsdate>
None.gif 02年07月06日
None.gif03年08月04日
None.gif


1,c++版本

None.gif #include < fstream >
None.gif#include
< iostream >
None.gif#include
< string >
None.gif#include
< vector >
None.gif#include
< algorithm >
None.gif
using namespace std;
None.gif
None.gif
// 日期类
None.gif
class Date
ExpandedBlockStart.gifContractedBlock.gif
dot.gif {
InBlock.gif
private:
InBlock.gif
stringyear;//
InBlock.gif
stringmonth;//
InBlock.gif
stringday;//
InBlock.gif
public:
InBlock.gifDate(
stringstrYear,stringstrMonth,stringstrDay):year(strYear),month(strMonth),day(strDay)
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{
ExpandedSubBlockEnd.gif}

InBlock.gif
~Date()
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{
ExpandedSubBlockEnd.gif}

InBlock.gif
stringYear()const
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{
InBlock.gif
returnyear;
ExpandedSubBlockEnd.gif}

InBlock.gif
stringMonth()const
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{
InBlock.gif
returnmonth;
ExpandedSubBlockEnd.gif}

InBlock.gif
stringDay()const
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{
InBlock.gif
returnday;
ExpandedSubBlockEnd.gif}

ExpandedBlockEnd.gif}
;
None.gif
None.gif
// 用于比较日期
None.gif
class LessThan
ExpandedBlockStart.gifContractedBlock.gif
dot.gif {
InBlock.gif
public:
InBlock.gif
booloperator()(constDate*date1,constDate*date2)
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{
InBlock.gif
if(date1->Year()<date2->Year())
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{
InBlock.gif
returntrue;
ExpandedSubBlockEnd.gif}

InBlock.gif
elseif(date1->Month()<date2->Month())
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{
InBlock.gif
returntrue;
ExpandedSubBlockEnd.gif}

InBlock.gif
elseif(date1->Day()<date2->Day())
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{
InBlock.gif
returntrue;
ExpandedSubBlockEnd.gif}

InBlock.gif
else
InBlock.gif
returnfalse;
ExpandedSubBlockEnd.gif}

ExpandedBlockEnd.gif}
;
None.gif
None.gif
None.gif
// 日期文件
None.gif
class DateContainer
ExpandedBlockStart.gifContractedBlock.gif
dot.gif {
InBlock.gif
private:
InBlock.gif
staticconststringfileName;
InBlock.gifvector
<Date*>m_dates;
InBlock.gif
public:
InBlock.gifDateContainer()
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{
ExpandedSubBlockEnd.gif}

InBlock.gif
~DateContainer()
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{
InBlock.gifvector
<Date*>::iteratoriter;
InBlock.gif
for(iter=m_dates.begin();iter!=m_dates.end();++iter)
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{
InBlock.gifdelete(
*iter);
ExpandedSubBlockEnd.gif}

InBlock.gifm_dates.clear();
ExpandedSubBlockEnd.gif}

InBlock.gif
InBlock.gif
boolProcessDate()
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{//读数据
InBlock.gif
ifstreaminfile(DateContainer::fileName.c_str());
InBlock.gif
if(!infile)
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{
InBlock.gif
returnfalse;
ExpandedSubBlockEnd.gif}

InBlock.gif
stringtmpLine;
InBlock.gif
while(infile>>tmpLine)
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{
InBlock.gif
//读一行数据
InBlock.gif
intfirstPos=tmpLine.find_first_of('-');//第一个'-'
InBlock.gif
intlastPos=tmpLine.find_last_of('-');//第二个'-'
InBlock.gif
stringstrOne=tmpLine.substr(0,2);//第一个域
InBlock.gif
stringstrTwo=tmpLine.substr(firstPos+1,2);//第二个域
InBlock.gif
stringstrThree=tmpLine.substr(lastPos+1,2);//第三个域
InBlock.gif
intyear,month,day;
InBlock.gifyear
=ProcessField(strOne);
InBlock.gifmonth
=ProcessField(strTwo);
InBlock.gifday
=ProcessField(strThree);
InBlock.gif
if(IsValidRecord(year,month,day))
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{//符合要求,保存此记录
InBlock.gif
Date*date=newDate(strOne,strTwo,strThree);
InBlock.gifm_dates.push_back(date);
ExpandedSubBlockEnd.gif}

ExpandedSubBlockEnd.gif}

InBlock.gifsort(m_dates.begin(),m_dates.end(),LessThan());
//排序
InBlock.gif
printDates();
InBlock.gif
returntrue;
ExpandedSubBlockEnd.gif}

InBlock.gif
InBlock.gif
intProcessField(string&field)
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{//处理各个域
InBlock.gif
if(field[0]=='0')
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{
InBlock.gif
returnfield[1]-'0';
ExpandedSubBlockEnd.gif}

InBlock.gif
else
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{
InBlock.gif
return(field[0]-'0')*10+(field[1]-'0');
ExpandedSubBlockEnd.gif}

ExpandedSubBlockEnd.gif}

InBlock.gif
boolIsValidRecord(intfirst,intsecond,intthird)
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{//是否合法记录
InBlock.gif
return(first+second+third)==15;
ExpandedSubBlockEnd.gif}

InBlock.gif
voidprintDates()
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{//遍历输出
InBlock.gif
vector<Date*>::iteratoriter;
InBlock.gif
for(iter=m_dates.begin();iter!=m_dates.end();++iter)
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{
InBlock.gifcout
<<(*iter)->Year()<<""<<(*iter)->Month()<<""<<(*iter)->Day()<<""<<endl;
ExpandedSubBlockEnd.gif}

ExpandedSubBlockEnd.gif}

InBlock.gif
ExpandedBlockEnd.gif}
;
None.gif
None.gif
const string DateContainer::fileName = " D://abc.txt " ; // 数据文件
None.gif

None.gif
int main()
ExpandedBlockStart.gifContractedBlock.gif
dot.gif {
InBlock.gifDateContainercontainer;
InBlock.gif
//读取数据
InBlock.gif
if(!container.ProcessDate())
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{
InBlock.gifcout
<<"error"<<endl;
InBlock.gif
return-1;
ExpandedSubBlockEnd.gif}

InBlock.gifsystem(
"pause");
InBlock.gif
return0;
ExpandedBlockEnd.gif}

None.gif

2,C#

版:

None.gif
None.gif
using System;
None.gif
using System.Collections.Generic;
None.gif
using System.Text;
None.gif
using System.Collections;
None.gif
using System.IO;
None.gif
None.gif
namespace ConsoleApplication1
ExpandedBlockStart.gifContractedBlock.gif
dot.gif {
InBlock.gif
//日期类
InBlock.gif
classDate:IComparable
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{
InBlock.gif
privateStringyear;//
InBlock.gif
privateStringmonth;//
InBlock.gif
privateStringday;//
InBlock.gif
publicDate(StringstrYear,StringstrMonth,StringstrDay)
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{
InBlock.gif
this.year=strYear;
InBlock.gif
this.month=strMonth;
InBlock.gif
this.day=strDay;
ExpandedSubBlockEnd.gif}

InBlock.gif
InBlock.gif
publicStringYear
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{
InBlock.gif
get
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{
InBlock.gif
returnyear;
ExpandedSubBlockEnd.gif}

ExpandedSubBlockEnd.gif}

InBlock.gif
publicStringMonth
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{
InBlock.gif
get
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{
InBlock.gif
returnmonth;
ExpandedSubBlockEnd.gif}

ExpandedSubBlockEnd.gif}

InBlock.gif
publicStringDay
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{
InBlock.gif
get
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{
InBlock.gif
returnday;
ExpandedSubBlockEnd.gif}

ExpandedSubBlockEnd.gif}

InBlock.gif
publicintCompareTo(objectobj)
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{
InBlock.gif
if(objisDate)
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{
InBlock.gifDateotherDate
=(Date)obj;
InBlock.gif
if(this.Year!=otherDate.Year)
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{
InBlock.gif
returnthis.Year.CompareTo(otherDate.Year);
ExpandedSubBlockEnd.gif}

InBlock.gif
elseif(this.Month!=otherDate.Month)
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{
InBlock.gif
returnthis.Month.CompareTo(otherDate.Month);
ExpandedSubBlockEnd.gif}

InBlock.gif
elseif(this.Day!=otherDate.Day)
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{
InBlock.gif
returnthis.Day.CompareTo(otherDate.Day);
ExpandedSubBlockEnd.gif}

InBlock.gif
else
InBlock.gif
return0;
ExpandedSubBlockEnd.gif}

InBlock.gif
else
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{
InBlock.gif
thrownewArgumentException("objectisnotaDate");
ExpandedSubBlockEnd.gif}

InBlock.gif
ExpandedSubBlockEnd.gif}

ExpandedSubBlockEnd.gif}

InBlock.gif
InBlock.gif
//日期文件
InBlock.gif
classDateContainer
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{
InBlock.gif
privateconstStringfileName="D://abc.txt";
InBlock.gif
privateArrayListm_dates=newArrayList();
InBlock.gif
publicDateContainer()
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{
ExpandedSubBlockEnd.gif}

InBlock.gif
publicboolProcessDate()
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{//读数据
InBlock.gif

InBlock.gifStreamReaderdin
=File.OpenText(fileName);
InBlock.gifStringtmpLine;
InBlock.gif
InBlock.gif
while((tmpLine=din.ReadLine())!=null)
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{
InBlock.gif
//读一行数据
InBlock.gif
intfirstPos=tmpLine.IndexOf('-');//第一个'-'
InBlock.gif
intlastPos=tmpLine.LastIndexOf('-');//第二个'-'
InBlock.gif
StringstrOne=tmpLine.Substring(0,2);//第一个域
InBlock.gif
StringstrTwo=tmpLine.Substring(firstPos+1,2);//第二个域
InBlock.gif
StringstrThree=tmpLine.Substring(lastPos+1,2);//第三个域
InBlock.gif
intyear,month,day;
InBlock.gifyear
=ProcessField(strOne);
InBlock.gifmonth
=ProcessField(strTwo);
InBlock.gifday
=ProcessField(strThree);
InBlock.gif
if(IsValidRecord(year,month,day))
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{//符合要求,保存此记录
InBlock.gif
Datedate=newDate(strOne,strTwo,strThree);
InBlock.gifm_dates.Add(date);
ExpandedSubBlockEnd.gif}

ExpandedSubBlockEnd.gif}

InBlock.gif
InBlock.gifm_dates.Sort();
InBlock.gifprintDates();
InBlock.gif
returntrue;
ExpandedSubBlockEnd.gif}

InBlock.gif
InBlock.gif
publicintProcessField(Stringfield)
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{//处理各个域
InBlock.gif
if(field[0]=='0')
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{
InBlock.gif
returnfield[1]-'0';
ExpandedSubBlockEnd.gif}

InBlock.gif
else
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{
InBlock.gif
return(field[0]-'0')*10+(field[1]-'0');
ExpandedSubBlockEnd.gif}

ExpandedSubBlockEnd.gif}

InBlock.gif
publicboolIsValidRecord(intfirst,intsecond,intthird)
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{//是否合法记录
InBlock.gif
return(first+second+third)==15;
ExpandedSubBlockEnd.gif}

InBlock.gif
publicvoidprintDates()
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{//遍历输出
InBlock.gif
foreach(Datedateinm_dates)
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{
InBlock.gifSystem.Console.WriteLine(
"{0}年{1}月{2}日",date.Year,date.Month,date.Day);
ExpandedSubBlockEnd.gif}

ExpandedSubBlockEnd.gif}

InBlock.gif
ExpandedSubBlockEnd.gif}

InBlock.gif
classProgram
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{
InBlock.gif
staticvoidMain(string[]args)
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{
InBlock.gifDateContainercontainer
=newDateContainer();
InBlock.gifcontainer.ProcessDate();
ExpandedSubBlockEnd.gif}

ExpandedSubBlockEnd.gif}

ExpandedBlockEnd.gif}

None.gif
None.gif

3java:

None.gif
None.gif
None.gif
import java.util.ArrayList;
None.gif
import java.util.Collections;
None.gif
import java.util.Comparator;
None.gif
import java.io.BufferedReader;
None.gif
import java.io.FileReader;
None.gif
import java.io.FileNotFoundException;
None.gif
import java.io.IOException;
None.gif
None.gif
None.gif
// 日期类
None.gif
class MyDate
ExpandedBlockStart.gifContractedBlock.gif
dot.gif {
InBlock.gif
privateStringyear;//
InBlock.gif
privateStringmonth;//
InBlock.gif
privateStringday;//
InBlock.gif
publicMyDate(StringstrYear,StringstrMonth,StringstrDay)
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{
InBlock.gif
this.year=strYear;
InBlock.gif
this.month=strMonth;
InBlock.gif
this.day=strDay;
ExpandedSubBlockEnd.gif}

ExpandedSubBlockStart.gifContractedSubBlock.gif
publicStringgetDay()dot.gif{
InBlock.gif
returnday;
ExpandedSubBlockEnd.gif}

ExpandedSubBlockStart.gifContractedSubBlock.gif
publicStringgetMonth()dot.gif{
InBlock.gif
returnmonth;
ExpandedSubBlockEnd.gif}

ExpandedSubBlockStart.gifContractedSubBlock.gif
publicStringgetYear()dot.gif{
InBlock.gif
returnyear;
ExpandedSubBlockEnd.gif}

ExpandedBlockEnd.gif}

None.gif
// 用于比较日期
None.gif
class LessThan implements Comparator
ExpandedBlockStart.gifContractedBlock.gif
dot.gif {
InBlock.gif
publicintcompare(Objecto1,Objecto2)
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{
InBlock.gifMyDatedate1
=(MyDate)o1;
InBlock.gifMyDatedate2
=(MyDate)o2;
InBlock.gif
if(date1.getYear()!=date2.getYear())
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{
InBlock.gif
returndate1.getYear().compareTo(date2.getYear());
ExpandedSubBlockEnd.gif}

InBlock.gif
elseif(date1.getMonth()!=date2.getMonth())
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{
InBlock.gif
returndate1.getMonth().compareTo(date2.getMonth());
ExpandedSubBlockEnd.gif}

InBlock.gif
elseif(date1.getDay()!=date2.getDay())
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{
InBlock.gif
returndate1.getDay().compareTo(date2.getDay());
ExpandedSubBlockEnd.gif}

InBlock.gif
else
InBlock.gif
return0;
ExpandedSubBlockEnd.gif}

InBlock.gif
ExpandedBlockEnd.gif}

None.gif
None.gif
// 日期文件
None.gif
class DateContainer
ExpandedBlockStart.gifContractedBlock.gif
dot.gif {
InBlock.gif
privatefinalStringfileName="D://abc.txt";
InBlock.gif
privateArrayList<MyDate>m_dates=newArrayList();
InBlock.gif
InBlock.gif
publicDateContainer()
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{
ExpandedSubBlockEnd.gif}

InBlock.gif@SuppressWarnings(
"unchecked")
InBlock.gif
publicbooleanProcessDate()
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{//读数据
InBlock.gif

InBlock.gifFileReaderfr
=null;
InBlock.gifBufferedReaderbr
=null;
InBlock.gifStringBuffersBuffer
=newStringBuffer();
InBlock.gif
try
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{
InBlock.gif
try
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{
InBlock.giffr
=newFileReader(fileName);//建立FileReader对象,并实例化为fr
ExpandedSubBlockEnd.gif
}

InBlock.gif
catch(FileNotFoundExceptione)
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{
InBlock.gife.printStackTrace();
ExpandedSubBlockEnd.gif}

InBlock.gifbr
=newBufferedReader(fr);//建立BufferedReader对象,并实例化为br
InBlock.gif

InBlock.gifStringtmpLine
=br.readLine();//从文件读取一行字符串
InBlock.gif
//判断读取到的字符串是否不为空
InBlock.gif
while(tmpLine!=null)
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{
InBlock.gif
intfirstPos=tmpLine.indexOf('-');//第一个'-'
InBlock.gif
intlastPos=tmpLine.lastIndexOf('-');//第二个'-'
InBlock.gif
StringstrOne=tmpLine.substring(0,2);//第一个域
InBlock.gif
StringstrTwo=tmpLine.substring(firstPos+1,lastPos);//第二个域
InBlock.gif
StringstrThree=tmpLine.substring(lastPos+1,tmpLine.length());//第三个域
InBlock.gif
intyear,month,day;
InBlock.gifyear
=ProcessField(strOne);
InBlock.gifmonth
=ProcessField(strTwo);
InBlock.gifday
=ProcessField(strThree);
InBlock.gif
if(IsValidRecord(year,month,day))
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{//符合要求,保存此记录
InBlock.gif
MyDatedate=newMyDate(strOne,strTwo,strThree);
InBlock.gifm_dates.add(date);
ExpandedSubBlockEnd.gif}

InBlock.giftmpLine
=br.readLine();//从文件中继续读取一行数据
ExpandedSubBlockEnd.gif
}

ExpandedSubBlockEnd.gif}

InBlock.gif
catch(IOExceptione)
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{
InBlock.gife.printStackTrace();
ExpandedSubBlockEnd.gif}

InBlock.gif
finally
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{
InBlock.gif
try
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{
InBlock.gif
if(br!=null)
InBlock.gifbr.close();
//关闭BufferedReader对象
InBlock.gif
if(fr!=null)
InBlock.giffr.close();
//关闭文件
ExpandedSubBlockEnd.gif
}

InBlock.gif
catch(IOExceptione)
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{
InBlock.gife.printStackTrace();
ExpandedSubBlockEnd.gif}

ExpandedSubBlockEnd.gif}

InBlock.gifComparatorcomp
=newLessThan();
InBlock.gifCollections.sort(m_dates,comp);
InBlock.gifprintDates();
InBlock.gif
returntrue;
ExpandedSubBlockEnd.gif}

InBlock.gif
InBlock.gif
publicintProcessField(Stringfield)
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{//处理各个域
InBlock.gif
if(field.charAt(0)=='0')
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{
InBlock.gif
returnfield.charAt(1)-'0';
ExpandedSubBlockEnd.gif}

InBlock.gif
else
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{
InBlock.gif
return(field.charAt(0)-'0')*10+(field.charAt(1)-'0');
ExpandedSubBlockEnd.gif}

ExpandedSubBlockEnd.gif}

InBlock.gif
publicbooleanIsValidRecord(intfirst,intsecond,intthird)
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{//是否合法记录
InBlock.gif
return(first+second+third)==15;
ExpandedSubBlockEnd.gif}

InBlock.gif
publicvoidprintDates()
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{//遍历输出
InBlock.gif
for(MyDatedate:m_dates)
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{
InBlock.gifSystem.out.println(date.getYear()
+""+date.getMonth()+""+date.getDay()+"");
ExpandedSubBlockEnd.gif}

ExpandedSubBlockEnd.gif}

InBlock.gif
ExpandedBlockEnd.gif}

None.gif
None.gif
public class DateDemo
ExpandedBlockStart.gifContractedBlock.gif
dot.gif {
InBlock.gif
publicstaticvoidmain(String[]args)throwsIOException
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{
InBlock.gif
//TODOAuto-generatedmethodstub
InBlock.gif
DateContainercontainer=newDateContainer();
InBlock.gifcontainer.ProcessDate();
InBlock.gifSystem.in.read();
InBlock.gif
ExpandedSubBlockEnd.gif}

InBlock.gif
ExpandedBlockEnd.gif}

None.gif
None.gif

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值