"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