In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article focuses on "what are the idea code completion features", interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn "what are the idea code completion features"?
If correlation
Define a variable of type boolean flag and a variable of type String name for testing.
Boolean flag = true;String name = "Java Journey"
The judgment condition is established.
Syntax:
Flag.if
Effect:
If (flag) {}
The judgment condition is not valid.
Syntax:
Flag.else
Effect:
If (! flag) {}
The judgment condition is equal to null
Syntax:
String.null
Effect:
If (string = = null) {}
Judgment condition is not equal to null
Syntax:
String.notnull or string.nn
Effect:
If (string! = null) {}
Use switch to judge
Syntax:
Switch (string) {}
Effect:
Switch (string) {}
Use while to judge
Syntax:
Flag.while
Effect:
While (flag) {} for related
Define an array of string types to test.
String [] param = {"1", "2", "3"}
Traverse from the first element
Syntax:
Param.fori
Effect:
For (int I = 0; I
< param.length; i++) {} 从最后一个元素进行遍历 语法: param.forr 效果: for (int i = param.length - 1; i >= 0; iMurt -) {}
Enhanced for cycle
Syntax:
Param.for or param.iter
Effect:
For (String s: param) {} variable correlation
Define a new User class and add two attributes, name and age, for testing.
Public class User {private String name = "Java journey"; private int age = 18; public User () {} public User (String name, int age) {this.name = name; this.age = age;}}
Create an object
Syntax:
User.new
Effect:
New User ()
Create a local variable
Syntax:
New User () var
Effect:
User user = new User ()
Create a global variable
Syntax:
New User () field
Effect:
Private User user;user = new User ()
Cast object types, if we convert Object to User
Syntax:
New object.castvar
Effect:
User user = (User) new Object (); other commonly used
Return statement
Syntax:
".return
Effect:
Return ""
Print statement
Syntax:
Flag.sout
Effect:
System.out.println (flag)
Catch and handle exception
Syntax:
New User () try
Effect:
Try {new User ();} catch (Exception e) {e.printStackTrace ();}
Throw an exception
Syntax:
New Exception () throw
Effect:
Throw new Exception ()
Lock a variable
Syntax:
String.synchronized
Effect:
Synchronized (string) {} so far, I believe you have a deeper understanding of "what idea code completion features". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.