Basic packaging types


Basic wrapper type is to wrap simple data type into complex data type.

var str = ‘andy’;


Only objects and complex data types have attributes and methods. Why is there a length attribute?

The process is as follows

Var temp = new string (‘andy ‘); / / wrapped as complex data type

STR = temp; / / give the value of the temporary variable to str

Temp = null; / / the temporary variable will be destroyed automatically

Recommended Today

Rust programming video tutorial (Advanced) – 024_ 3 syntax of all modes 3

Video address Headline address:…Station B address: Source address GitHub address:… Explanation content 1. Ignore values in mode(1) Use_ Ignore entire valueexample: fn foo(_: i32, y: i32) { println!(“This code only uses the y parameter: {}”, y); } fn main() { foo(3, 4); } Note: placeholders are used for parameters in the function, mainly when implementing […]