• JavaScript
  • jQuery
  • Java IO
  • SQL Tutorial
  • Servlet
  • JSP
  • Struts
  • Core Java
  • PHP

  • <

    Rust Constants

    Constants values are cannot be changed.const keyword is used to represent constant.


    Rust Constant Syntax

    const VARIABLE_NAME:dataType = value;
    

    Rust Constant Example


    fn main() {
       const L:i32 = 10;    // Declare a integer constant
     
       println!("user limit is {}",L);  //Display value of the constant
      
    }
    

    Output
    capture
















    © copyright 2017-2021 Completedone pvt ltd.