其他分享
首页 > 其他分享> > idea中各种循环的快捷键

idea中各种循环的快捷键

作者:互联网


itar 生成array for代码块

  1. for (int i = 0; i < array.length; i++) {
  2. = array[i];
  3. }
  • 1


itco 生成Collection迭代 

  1. for (Iterator<String> iterator = locationUrl.iterator(); iterator.hasNext(); ) {
  2. String next = iterator.next();
  3. }
  • 1


iten 生成enumeration遍历

  1. while (enumeration.hasMoreElements()) {
  2. Object nextElement = enumeration.nextElement();
  3. }
  • 1

iter 生成增强forxun

  1. for (String s : locationUrl) {
  2. }
  • 1

itit  生成iterator 迭代

  1. while (iterator.hasNext()) {
  2. Object next = iterator.next();
  3. }
  • 1

itli 生成List的遍历

  1. for (int i = 0; i < locationUrl.size(); i++) {
  2. String s = locationUrl.get(i);
  3. }
  • 1

ittok 生成String token遍历

  1. for (StringTokenizer stringTokenizer = new StringTokenizer(TVSOU_URL); stringTokenizer.hasMoreTokens(); ) {
  2. String s = stringTokenizer.nextToken();
  3. }
  • 1

itve 生成Vector数组迭代

  1. for (int i = 0; i < vector.size(); i++) {
  2. Object elementAt = vector.elementAt(i);
  3. }
  • 1

另外两个和循环无关,只是方便创建

itaws 生成Axis2 web service调用

  1. try {
  2. MyServiceStub stub = new MyServiceStub();
  3. stub.sayHelloWorldFrom();
  4. } catch (Exception ex) {
  5. ex.printStackTrace();
  6. }
  • 1


itws 生成 Axis web service调用

  1. try {
  2. MyServiceLocator locator = new MyServiceLocator();
  3. Activator service = locator.get();
  4. // If authorization is required
  5. //((MyService_Soap_BindingStub)service).setUsername("user3");
  6. //((MyService_Soap_BindingStub)service).setPassword("pass3");
  7. // invoke business method
  8. service.businessMethod();
  9. } catch (javax.xml.rpc.ServiceException ex) {
  10. ex.printStackTrace();
  11. } catch (java.rmi.RemoteException ex) {
  12. ex.printStackTrace();
  13. }
  • 1


具体如图:



标签:locationUrl,iterator,service,idea,快捷键,循环,ex,生成,String
来源: https://blog.csdn.net/weixin_42736725/article/details/97164253