Although based on C + +, Java is a more purely object-oriented programming language

Source: Internet
Author: User

"Although based on C + +, Java is a more purely object-oriented programming language." Both C + + and Java are part of the hybrid language. But in Java, designers find this miscellaneous merger not as important as in C + +. The hybrid language allows for a variety of programming styles, while C + + is a hybrid language because it supports backward compatibility with the C language. Because C + + is a superset of C, many of the features contained in it are not available, which makes C + + somewhat complex in some places. The Java language first assumes that we only want to do object-oriented programming. In other words, before formally using it to design, you must first transfer your thoughts into an object-oriented world (unless you are accustomed to the way of thinking in the world). Only by doing this preparation can you understand the ease of use of Java in comparison with other OOP languages. In this chapter, we'll explore the basic components of Java programs and understand why everything inside Java and even Java programs is an object.

1  Packagecom.tomtest;2 3 4 classtomtest_44 {5      Public Static voidMain (String args[]) {6        intNumber=0; 7String s= "Student;entropy;engage,english,client";8         for(intK=0;k<s.length (); k++) {9           if(S.regionmatches (k, "en", 0,2)) {Tennumber++; One           } A        }  -System.out.println ("number=" +Number ); -     } the}

Although based on C + +, Java is a more purely object-oriented programming language

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.