ここでのプログラムは、特定の文末形式を探すことになっています。 宣言的、感嘆符的、または疑問符であれば。私はしかし、ダイアログボックスを構成しようとする問題があります。私はまた、if文が適切な応答を返すように適切に設定されているかどうかも確かではありません。 import javax.swing.JOptionPane;
public class P45
{
public static vo
マイコード: <p id="test"></p>
<script>
var text="Hi I am Anonymous";
if text.IndexOf("Hi") {
document.getElementById("test").innerHTML = "Hey Anonymous";
return;
}//Sorry for the bad intending
</scr
int型の値を返し、文字列配列の文字列(char以外)を認識する単純なindexOf()メソッドを作成しようとしています。 public int indexOf(String str) {
/*Getting and return the index of the first
*occurrence of the specified String. Return
*
var myStr = "I love chocolate and strawberry, love this and that as well, and again love walking along the street";
var newStr = myStr.substr(myStr.indexOf('love'), myStr.lastIndexOf('love'));
///
indexOf(char)メソッドとループのメソッドを使用して、共通文字を2つの文字列で検索するプログラムを作成するように求められます。これまでのところ、出力はまだ空白になっています。 import java.util.Scanner;
public class ClassName {
public static void main (String args []) {
S