What is the difference between statically typed and dynamically typed languages?

后端 未结 16 2027

I hear a lot that new programming languages are dynamically typed but what does it actually mean when we say a language is dynamically typed vs. statically typed?

16条回答
  •  情深已故
    2020-11-22 01:59

    Static Typing: The languages such as Java and Scala are static typed.

    The variables have to be defined and initialized before they are used in a code.

    for ex. int x; x = 10;

    System.out.println(x);

    Dynamic Typing: Perl is an dynamic typed language.

    Variables need not be initialized before they are used in code.

    y=10; use this variable in the later part of code

提交回复
热议问题