tsld027.htm

来自「an excellent java tutorial for the ones 」· HTM 代码 · 共 66 行

HTM
66
字号

<HTML>

<HEAD>
<META HTTP-EQUIV="Context-Type" CONTEXT="text/html;charset=windows-1252">
<meta name="GENERATOR" content="Microsoft Internet Assistant for PowerPoint 97">
 <TITLE>PPT Slide</TITLE> 
</HEAD>

<BODY     >

 <H1>PPT Slide</H1> 
 <P><UL>
Using String Example<BR></UL></P>
<P><UL>
public class StringExample {  
<BR></UL><UL>
    public static void main(String[] argv) {
</UL><UL>
          String str = new String("my name is Thanassis");
</UL><UL>
	
</UL><UL>
         System.out.println("The string contains:" + str );
</UL><UL>
         System.out.println("its length is :" + str.length() + " characters");
</UL><UL>
         System.out.println("uppercase :" +  str.toUpperCase());
</UL><UL>
         System.out.println("lowercase :" +  str.toLowerCase());
</UL><UL>
         System.out.println("-is- starts at :" +  str.indexOf("is") );
</UL><UL>
         if (!str.equals("my name is Thanasis")) System.out.println("not true");
</UL><UL>
    }
</UL><UL>
}</UL></P>
<P><UL>
The string contains:my name is Thanassis
<BR></UL><UL>
its length is :20 characters
</UL><UL>
uppercase :MY NAME IS THANASSIS
</UL><UL>
lowercase :my name is thanassis
</UL><UL>
-is- starts at :8
</UL><UL>
not true</UL></P>
<P></P> 
<P>
<TABLE>
  <TD HEIGHT=100 WIDTH=100> <A HREF="tsld026.htm">Previous slide</A> </TD>
  <TD HEIGHT=100 WIDTH=100> <A HREF="tsld028.htm">Next slide</A> </TD>
  <TD HEIGHT=100 WIDTH=150> <A HREF="tsld001.htm">Back to first slide</A> </TD>
  <TD HEIGHT=100 WIDTH=150> <A HREF="sld027.htm">View graphic version</A> </TD>
</TABLE>
<BR>
</P>



</Body>
</HTML>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?