So i have to display the amount of characters in my encoded string and i have to print the number of char in a line. I'm not sure where to put it into my code.

Java Code:
import java.util.Scanner;

public class URLencoder {

	Scanner in;
	String text, finished = "";
	char temp;
	String noChange = "qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM_-.*";
	boolean found;
	
	public URLencoder(){
		in = new Scanner(System.in);
		System.out.println("Enter text to be encoded:");
		text = in.nextLine();
		for(int counter = 0; counter < text.length(); counter++){
			temp = text.charAt(counter);
			if(noChange.indexOf(temp) != -1){
				finished += temp;
			}else{
				if(Integer.toHexString(temp) == "20"){
					finished += "+";
				}else{
					finished += "%" + Integer.toHexString(temp);
				}

			}
		}
		System.out.println(finished);
	}
	
	private static int length() {
		// TODO Auto-generated method stub
		return 0;
	}

	public static void main(String[] args) {
		new URLencoder();
	}

}