One of my readers asked me about the difference between ArrayList vs ArrayList< in Java?>, which was actually asked to him on a recent Java development interview. The key difference between them is that ArrayList is not using generics while ArrayList is a generic ArrayList but they looks very similar. If a method accepts ArrayList or ArrayList<?> as a parameter then it can accept any type of ArrayList e.g....
GNIIT DATA, NIIT, NIIT CYCLE TEST, NIIT LAB@HOME, NIIT PROJECTS, NIIT ASSIGNMENTS, NIIT EXAM, C SHARP, JAVA, SQL, ORACLE, C, C++, DBMS, GITHUB, DROOLS, JENKINS, HTML, OS, SERVLET, MS EXCEL, ADVANCE EXCEL, MS WORD, MS POWERPOINT,
Friday, 21 April 2017
Difference between Abstraction and Encapsulation in Java - OOP ~ GNIITHELP
Both Abstraction and Encapsulation are two of the four basic OOP concepts which allow you to model real-world things into objects so that you can implement them in your program and code. Many beginners get confused between Abstraction and Encapsulation because they both look very similar. If you ask someone what is Abstraction, he will tell that it's an OOP concept which focuses on relevant information by hiding unnecessary detail, and when you ask about Encapsulation,...
How to compare two XML files in Java - XMLUnit Example ~ GNIITHELP
The XMLUnit library can be used to compare two XML files in Java. Similar to JUnit, XMLUnit can also be used to test XML files for comparison by extending the XMLTestcase class. It is a rich library and provides a detailed comparison of XML files. Btw, comparing XML is completely different than comparing String in Java or comparing object using equals(), as two XML which contains different comment and whitespace can be equals, which is not true for String...
Top 5 books to Learn Object Oriented Programming - Must Read, Best of Lot ~ GNIITHELP
The OOP or Object Oriented Programming is one of the most popular programming paradigms which helps you to organize code in re the l world system. It's a tool which helps you to write complex software by thinking in terms of objects. Unlike its predecessor procedural programming paradigm which is implemented most notably by C, which solves the problem and complete task by writing code for computers, OOP style of programming allows you to think in terms of real world objects...
10 Examples of CUT command in UNIX and Linux ~ GNIITHELP
The cut command in UNIX is a nice utility program which allows you to cut data from a text file. The Linux cut command allows you to cut data by character, by field or by column. if used correctly along with sed, find, or grep in UNIX, the cut can do lots of reporting stuff. For example, you can extract columns from a comma separated file or a pipe or colon delimited file using cut command. For example, if you are only interested...
Java Program to Multiply Two Matrices - Matrix Multiplication Example ~ GNIITHELP
How to write a Java program to multiply two matrices in Java is a very good programming exercise to get familiar with the two-dimensional array in Java. this example teaches about how to multiply arrays, how to access elements from a multi-dimensional array, how to pass them to a function etc. Since the matrix is a natural representation of multi-dimensional array in Java, they are often used to illustrate real word matrix exercises e.g. the calculating sum of two matrices...
Subscribe to:
Posts (Atom)