Author: Editorial Team
-
Is Python interpreted, compiled or both?
Let us first see is short what is ‘compile’ and ‘interpreted’ means. In the simple definition ‘compile‘ means to convert a high-level language program into a binary executable machine code (CPU instructions). The result of ‘compile’ is a file which can be executed directly. In the simple definition, ‘interpreted‘ means reading the source code one…
-
Python identifiers and keywords
An identifier is a name given to a variable, function, class or module. Only following are allowed in identifiers: Lowercase (a-z) characters Uppercase (A-Z) characters Digits (0-9) Underscore(_) An identifier can be a combination of lowercase characters, uppercase characters, digits and underscore. An identifier can not start with a digit. 1y is invalid identifier whereas…
-
Limitations of Python
Python is a very popular language. Every programming language has shortcomings so does Python. Following are important shortcomings of Python programming language: Performance and Speed – It has been proved that Python is slow in comparison to C/C++ and Java. Since Python is interpreted language, it can be slower in comparison to compiled languages. Python…
-
Features of Python
Simple – Python is a very simple language. Writing Python code is very simple and looks like writing English many times. However the rules of writing Python code are strict than English. Easy to learn – Python is very easy to learn. Python has very less reserved words and are very much like English words.…
-
Introduction to Python and it’s brief history
Python is a general purpose high-level programming language. It is very easy to learn and has very simple syntax and that is why it is very popular. Python provides high-level and efficient data structures. Python is interpreted and dynamically typed. Python supports multiple programming paradigms, including object-oriented, procedural and functional programming. Python also supports features…
-
strict mode in JavaScript
JavaScript was developed over the years and several versions came but backward compatibility was maintained. The downside of this approach is that all imperfect language constructs remained there in language over the years. In ECMAScript 5, there were some major changes done to the existing language features. To maintain backward compatibility, these features are off…
-
Java 8 Optional
1. Introduction Those who are coding in Java know that null reference which results in NullPointerException is a big problem. Optional class was introduced in Java SE 8. This class is available in java.util package. Optional is a container object which may or may not contain a non-null value. This class has a method isPresent()…
-
Java 8 Predicate with example
In mathematics, a predicate is a Boolean-valued function P: X→ {true, false}, called a predicate on X. In Java, we can say that Predicate represents a boolean-valued function of one argument. Predicate has a functional method test(Object). Interface Predicate<T> is a predefined functional interface available in package java.util.function. Predicate’s usage Predicate can be used to…
-
main method inside interface
Yes, you can defined main method inside interface in Java 8. Prior to Java 8, static methods were not allowed in interface. In Java 8, you can define static method inside interface. main method is just another static method, so you can define main method inside interface. Since an interface is saved as .java file…
-
static methods in interface
In Java 8, you can define static methods in interfaces. The use of static methods is to write helper methods. A static method is associated with the class in which it is defined rather than the object of that class. Java 8 has introduced static methods in interfaces. Now you can define static methods specific…
