Java 应用与开发 - Java 数组和字符串学习目标 1. 掌握 Java 数组的概念 2. 学会一维数组和二维数组的使用;认识 Arrays 类,掌握操 作数组相关方法 3. 掌握 Java 字符串的概念,字符串与数组的关系;学会 String 类常用字符串操作方法 大纲 数组的概念 一维数组 二维数组 字符串 大纲 数组的概念 一维数组 二维数组 字符串 大纲 数组的概念 一维数组 二维数组 字符串 接下来… 数组的概念 ▶ 字符串是用一对双引号括起来的字符序列。Java 语言中, 字符串常量或变量均用类实现。 ▶ String 对象是不可变的。String 类每一个看起来会修改 String 值的方法,实际上都创建了一个新的对象,以包含修 改后的字符串内容。 1 String s = new String("hello java"); 2 s.toUpperCase(); 3 System.out.println(s); println(s); 大纲 数组的概念 一维数组 二维数组 字符串 理解 Java 字符串 CODE ± String.java Part 1 1 public final class String 2 implements java.io.Serializable, Comparable<String>, CharSequence { //1 3 /** The value is used for0 码力 | 33 页 | 620.46 KB | 1 年前3
跟我学Shiro - 张开涛2、ini 配置文件指定自定义 Realm 实现(shiro-realm.ini) String getName(); //返回一个唯一的 Realm 名字 boolean supports(AuthenticationToken token); //判断此 Realm 是否支持此 Token AuthenticationException; //根据 Token 获取认证信息 public class MyRealm1 implements Realm { @Override public String getName() { return "myrealm1"; } @Override public boolean supports(AuthenticationToken en token) throws AuthenticationException { String username = (String)token.getPrincipal(); //得到用户名 String password = new String((char[])token.getCredentials()); //得到密码 if(0 码力 | 219 页 | 4.16 MB | 10 月前3
Spring Framwork Core Technologies v5.3.36 SNAPSHOT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 Null and Empty String Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Using register(Class>…) . . . . . . . . . . . . . . . 148 Enabling Component Scanning with scan(String…) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148 Support for Web Applications here --> ① The id attribute is a string that identifies the individual bean definition. 4 ② The class attribute defines the type of the0 码力 | 485 页 | 6.31 MB | 1 年前3
《Java 应用与开发》课程讲义 - 王晓东. . . . . . . 26 3.5.1 字符串变量的创建 . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 3.5.2 String 类的常用方法 . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 3.5.3 理解 Java 字符串 . . . . . . . 个 Java 源文件 HelloWorld.java,文件命名必须与类名相同。 1 public class HelloWorld { 2 public static void main(String[] args) { 3 System.out.println(”Hi, Java!”); 4 } 5 } . . . . . . . . . . . . . . . . . . . . 字符声明用单引号表示单个字符。 • 字符型数据可以转化为整型。 示例代码:字符数据类型示例 1 public class CharDemo { 2 public static void main(String[] args) { 3 char a = ’J’; 4 char b=’Java’; //会报错 5 } 6 } 1建议搜索理解什么是字符集和字符编码规则。 . . . . . .0 码力 | 330 页 | 6.54 MB | 1 年前3
Spring Framwork Web on Reactive Stack v5.3.36 SNAPSHOTmethod for accessing form data: Java MonoString, String>> getFormData(); Kotlin suspend fun getFormData(): MultiValueMap<String, String> The DefaultServerWebExchange uses the configured HttpMessageReader Mono String, Part>> getMultipartData(); Kotlin suspend fun getMultipartData(): MultiValueMap<String, Part> The DefaultServerWebExchange uses the configured HttpMessageReader String, Part>> more on this topic. The spring-core module provides byte[], ByteBuffer, DataBuffer, Resource, and String encoder and decoder implementations. The spring-web module provides Jackson JSON, Jackson Smile 0 码力 | 182 页 | 2.52 MB | 1 年前3
Spring Framwork Web on Servlet Stack v5.3.36 SNAPSHOTnew Class>[] { App1Config.class }; } @Override protected String[] getServletMappings() { return new String[] { "/app1/*" }; } } Kotlin class MyWebAppInitializer : AbstractA return arrayOf(App1Config::class.java) } override fun getServletMappings(): Array<String> { return arrayOf("/app1/*") } } If an application context hierarchy is not required to handlers, to HTML error views, or other targets. See Exceptions. ViewResolver Resolve logical String-based view names returned from a handler to an actual View with which to render to the response0 码力 | 259 页 | 3.58 MB | 1 年前3
Spring Framework Reference Documentation v4.3.2Collections Collection merging Limitations of collection merging Strongly-typed collection Null and empty string values XML shortcut with the p-namespace XML shortcut with the c-namespace Compound property names the container programmatically using register(Class>… ) Enabling component scanning with scan(String… ) Support for web applications with AnnotationConfigWebApplicationContext Using the @Bean annotation public @interface ContextConfiguration { @AliasFor("locations") String[] value() default {}; @AliasFor("value") String[] locations() default {}; // ... } Similarly, composed annotations0 码力 | 1311 页 | 4.07 MB | 1 年前3
Spring Framework Reference Documentation 4.3.26.RELEASECollections Collection merging Limitations of collection merging Strongly-typed collection Null and empty string values XML shortcut with the p-namespace XML shortcut with the c-namespace Compound property names Building the container programmatically using register(Class>… ) Enabling component scanning with scan(String… ) Support for web applications with AnnotationConfigWebApplicationContext Using the @Bean annotation public @interface ContextConfiguration { @AliasFor("locations") String[] value() default {}; @AliasFor("value") String[] locations() default {}; // ... } Similarly, composed annotations0 码力 | 1323 页 | 4.08 MB | 1 年前3
Apache Wicket 8.x Reference Guidewicket-util wicket-util Contains general-purpose utility classes for functional areas such as I/O, lang, string manipulation, security, etc… None 6 wicket-bean-validation Provides support for JSR 303 standard wicket.markup.html.basic.Label is the simplest component shipped with Wicket. It just inserts a string (the second argument of its constructor) inside the corresponding HTML tag. Just like any other Label replaces the original content of its tag (in our example [Label’s message goes here]) with the string passed as value (Hello WicketWorld! in our example) 11 If we specify a wicket:id attribute for0 码力 | 350 页 | 9.95 MB | 1 年前3
Apache Wicket 7.x Reference Guidewicket-util wicket-util Contains general-purpose utility classes for functional areas such as I/O, lang, string manipulation, security, etc… None 7 wicket-datetime Contains special purpose components designed wicket.markup.html.basic.Label is the simplest component shipped with Wicket. It just inserts a string (the second argument of its constructor) inside the corresponding HTML tag. Just like any other (in our example _ _Label&.pdf ) with the string passed as value (_Hello WicketWorld! in our example). If we specify a wicket:id attribute0 码力 | 346 页 | 10.00 MB | 1 年前3
共 418 条
- 1
- 2
- 3
- 4
- 5
- 6
- 42













