package com.tenwa.reckon.util; import java.util.HashMap; import java.util.Map; import java.util.Set; public class MainTest { public static void main(String[] args) { /*Map switches = new HashMap(); for(int i = 1 ; i<=100 ; i++){ switches.put(i, true); } Set keys = switches.keySet(); for(int i = 1 ; i<= 100 ;i++){ for(Integer key : keys){ if(key % i == 0){ switches.put(key, !switches.get(key)); } } } for(int i = 1 ;i <= 100 ; i++){ if(!switches.get(i)){ System.out.println("编号为"+i+"的开关状态为关"); } }*/ String fileName = "zhangc.xlsx"; System.out.println(fileName.substring(fileName.lastIndexOf(".")+1)); } }