Here you can find the source of endsWith(char[] fieldDescriptor, char c)
public static boolean endsWith(char[] fieldDescriptor, char c)
//package com.java2s; /******************************************************************************* * Copyright (c) 2004, 2016 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors:/*from ww w . j a v a 2 s . co m*/ * IBM Corporation - initial API and implementation * Andrew Ferguson (Symbian) * Markus Schorn (Wind River Systems) * Sergey Prigogin (Google) *******************************************************************************/ public class Main { public static boolean endsWith(char[] fieldDescriptor, char c) { if (fieldDescriptor.length == 0) { return false; } return fieldDescriptor[fieldDescriptor.length - 1] == c; } }