We are sharing the best books for learning Java, which are read by almost every Java Developer, make you different and give an extra edge against the students who have just basic knowledge java.
Showing posts with label java. Show all posts
Showing posts with label java. Show all posts
Wednesday, January 18, 2017
Monday, January 16, 2017
Java Difference between Abstract class and Interface
Abtract class and interface both are used to achieve abstraction.
In this post, I will show you Diffence between Abstract class and Interface.
In this post, I will show you Diffence between Abstract class and Interface.
Wednesday, January 11, 2017
Java Count Number of Words in String
In this post, I will show you How to count number of Words in the String. It's easy via array and string class.
For example : "Hello World"
Result : 2.
Coding:
For example : "Hello World"
Result : 2.
Coding:
public class StringDemo { static int i,c=0,res; static int wordcount(String s) { char ch[]= new char[s.length()]; //in string especially we have to mention the () after length for(i=0;i<s.length();i++) { ch[i]= s.charAt(i); if( ((i>0)&&(ch[i]!=' ')&&(ch[i-1]==' ')) || ((ch[0]!=' ')&&(i==0)) ) c++; } return c; } public static void main (String args[]) { res=StringDemo.wordcount("Java Tutorial for Begginers"); //string is always passed in double quotes System.out.println("Result : " +res); } }
Result : 3
Good luck!
Java Difference between String, StringBuffer and String Builder
In this post, I will show you The difference between String, StringBuffer and String Builder. As you will find that there are minor differences between the above classess.
Java Difference between ArrayList and Vector
By Unknown2:20 AMarraylist, arraylist vs vector, Difference between ArrayList and Vector, java, vector
No comments:
This question is mostly used as a start up question by Interviewers testing deep roots of the Collection. Some differences between ArrayList and Vector.
Java Spring How to use JDBCTemplate Query
In this post, I will show you How to use JdbcTemplate query() method to query or extract data from database.



















