java 教程整理
382
.vscode/java-formatter.xml
vendored
Normal file
@@ -0,0 +1,382 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<profiles version="20">
|
||||
<profile kind="CodeFormatterProfile" name="JavaConventions" version="20">
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_ellipsis" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_for_statment" value="common_lines"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_logical_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_method_invocation" value="common_lines"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_imports" value="1"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_record_declaration" value="common_lines"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_switch_statement" value="common_lines"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.format_javadoc_comments" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.indentation.size" value="4"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_enum_constant_declaration" value="common_lines"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_default" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.align_with_spaces" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.disabling_tag" value="@formatter:off"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.continuation_indentation" value="2"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_before_code_block" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_switch_case_expressions" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_enum_constants" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_imports" value="1"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_end_of_method_body" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_package" value="1"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_if_while_statement" value="common_lines"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.indent_root_tags" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.enabling_tag" value="@formatter:on"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.count_line_length_from_starting_position" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_record_components" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_case" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.wrap_before_multiplicative_operator" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations" value="1"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameterized_type_references" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_logical_operator" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_annotation_declaration_on_one_line" value="one_line_never"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_record_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_enum_constant" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_multiplicative_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_block" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration" value="end_of_line"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.align_tags_descriptions_grouped" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.line_length" value="80"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.use_on_off_tags" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_method_body_on_one_line" value="one_line_never"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_loop_body_block_on_one_line" value="one_line_never"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_method_declaration" value="end_of_line"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_abstract_method" value="1"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_enum_constant_declaration_on_one_line" value="one_line_never"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.align_variable_declarations_on_columns" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_type_declaration_on_one_line" value="one_line_never"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_catch_clause" value="common_lines"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_additive_operator" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_record_constructor" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_relational_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_multiplicative_operator" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_anonymous_type_declaration_on_one_line" value="one_line_never"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_switch_case_expressions" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.wrap_before_shift_operator" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_record_declaration_on_one_line" value="one_line_never"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block" value="end_of_line"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration" value="end_of_line"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_lambda_body" value="end_of_line"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_end_of_code_block" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.compact_else_if" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_type_parameters" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_compact_loops" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_simple_for_body_on_same_line" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_relational_operator" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_unary_operator" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve" value="1"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_annotation" value="common_lines"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_ellipsis" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_additive_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_string_concatenation" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.format_line_comments" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_record_declaration" value="end_of_line"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.text_block_indentation" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.align_type_members_on_columns" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_assignment" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_module_statements" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_after_code_block" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.align_tags_names_descriptions" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_if_then_body_block_on_one_line" value="one_line_never"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_conditional_expression" value="80"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration" value="end_of_line"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block_in_case" value="end_of_line"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_default" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_between_different_tags" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_conditional_expression_chain" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.format_header" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.wrap_before_assertion_message_operator" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_additive_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_method_declaration" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.join_wrapped_lines" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.wrap_before_conditional_operator" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_shift_operator" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines" value="2147483647"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration" value="end_of_line"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_resources_in_try" value="80"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_try_clause" value="common_lines"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_code_block_on_one_line" value="one_line_never"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_record_components" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.tabulation.size" value="8"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.format_source_code" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_field" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer" value="2"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_method" value="1"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_record_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.wrap_before_assignment_operator" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_not_operator" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_switch" value="end_of_line"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.format_html" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_method_delcaration" value="common_lines"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_compact_if" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_lambda_body_block_on_one_line" value="one_line_never"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.indent_empty_lines" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_type_arguments" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_unary_operator" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_record_constructor_on_one_line" value="one_line_never"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_record_declaration" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_assertion_message" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk" value="1"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_label" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_case" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_member_type" value="1"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_logical_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_record_header" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_record_declaration" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.wrap_before_relational_operator" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.format_block_comments" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.indent_tag_description" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_record_constructor" value="end_of_line"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_string_concatenation" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_last_class_body_declaration" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_body" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_multiple_fields" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_simple_while_body_on_same_line" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_array_initializer" value="end_of_line"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.wrap_before_logical_operator" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_shift_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_statement_group_in_switch" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_lambda_declaration" value="common_lines"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_shift_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_simple_do_while_body_on_same_line" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_enum_declaration_on_one_line" value="one_line_never"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_record_components" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_constant" value="end_of_line"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_type_declaration" value="end_of_line"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_multiplicative_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_package" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_for_loop_header" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.wrap_before_additive_operator" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_simple_getter_setter_on_one_line" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_string_concatenation" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.join_lines_in_comments" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.indent_parameter_description" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_code_block" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_record_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.tabulation.char" value="mixed"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_relational_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.wrap_before_string_concatenation" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_import_groups" value="1"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.lineSplit" value="120"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch" value="insert"/>
|
||||
</profile>
|
||||
</profiles>
|
||||
7
.vscode/launch.json
vendored
@@ -4,6 +4,13 @@
|
||||
// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"type": "java",
|
||||
"name": "Launch Java01HelloWorld",
|
||||
"request": "launch",
|
||||
"mainClass": "Java01HelloWorld",
|
||||
"projectName": "notes_ce5bf3ea"
|
||||
},
|
||||
{
|
||||
"name": "g++.exe - 生成和调试活动文件",
|
||||
"type": "cppdbg",
|
||||
|
||||
5
.vscode/settings.json
vendored
@@ -188,4 +188,9 @@
|
||||
"*.log",
|
||||
"*.fdb_latexmk"
|
||||
],
|
||||
"java.format.settings.url": ".vscode/java-formatter.xml",
|
||||
"java.project.sourcePaths": [
|
||||
"Java源代码/Java1",
|
||||
"Java源代码/Code1"
|
||||
],
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
\|
|
||||
具体应该参考相应的jdk进行,了解相应的方法。这里只说明类的主要作用,和自己的相关理解,以及部分常用的方法。
|
||||
@@ -1 +0,0 @@
|
||||
以功能为单位进行记录。主要说明实现某个具体功能时用到的相关类。以及类的主要用法。
|
||||
|
Before Width: | Height: | Size: 126 KiB After Width: | Height: | Size: 126 KiB |
|
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 51 KiB |
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 263 B After Width: | Height: | Size: 263 B |
|
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 35 KiB |
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 97 KiB After Width: | Height: | Size: 97 KiB |
|
Before Width: | Height: | Size: 83 KiB After Width: | Height: | Size: 83 KiB |
|
Before Width: | Height: | Size: 187 KiB After Width: | Height: | Size: 187 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
517
Java基础教程/Java语言基础/01 Java基础.md
Normal file
@@ -0,0 +1,517 @@
|
||||
# Java 基础
|
||||
<!-- GFM-TOC -->
|
||||
- [Java 基础](#java-基础)
|
||||
- [0 引言](#0-引言)
|
||||
- [Java特性和优势](#java特性和优势)
|
||||
- [JDK、JRE和JVM](#jdkjre和jvm)
|
||||
- [编译和解释](#编译和解释)
|
||||
- [Java 各版本的新特性](#java-各版本的新特性)
|
||||
- [Java 与 C++ 的区别](#java-与-c-的区别)
|
||||
- [第一个Java程序](#第一个java程序)
|
||||
- [位、字节、字符、字长](#位字节字符字长)
|
||||
- [1 注释、标识符和关键字](#1-注释标识符和关键字)
|
||||
- [注释](#注释)
|
||||
- [标识符](#标识符)
|
||||
- [关键字](#关键字)
|
||||
- [2 数据类型](#2-数据类型)
|
||||
- [基本类型](#基本类型)
|
||||
- [引用类型](#引用类型)
|
||||
- [包装类型](#包装类型)
|
||||
- [字面值](#字面值)
|
||||
- [转义字符](#转义字符)
|
||||
- [3 类型转换](#3-类型转换)
|
||||
- [转换规则](#转换规则)
|
||||
- [float 与 double](#float-与-double)
|
||||
- [隐式类型转换](#隐式类型转换)
|
||||
- [4 变量常量](#4-变量常量)
|
||||
- [变量](#变量)
|
||||
- [变量作用域](#变量作用域)
|
||||
- [变量初始化](#变量初始化)
|
||||
- [常量](#常量)
|
||||
- [变量的命名规则](#变量的命名规则)
|
||||
- [5 运算符](#5-运算符)
|
||||
- [算术运算符](#算术运算符)
|
||||
- [关系运算符](#关系运算符)
|
||||
- [位运算符](#位运算符)
|
||||
- [逻辑运算符](#逻辑运算符)
|
||||
- [赋值运算符](#赋值运算符)
|
||||
- [条件运算符(?:)](#条件运算符)
|
||||
- [instanceof 运算符](#instanceof-运算符)
|
||||
- [运算符优先级](#运算符优先级)
|
||||
- [6 包机制和JavaDoc](#6-包机制和javadoc)
|
||||
- [包机制](#包机制)
|
||||
- [JavaDoc](#javadoc)
|
||||
<!-- GFM-TOC -->
|
||||
|
||||
## 0 引言
|
||||
|
||||
### Java特性和优势
|
||||
|
||||
> write once run anywhere
|
||||
|
||||
1. 面向对象
|
||||
2. 可移植性
|
||||
3. 高性能(即时编译和预编译)
|
||||
4. 分布式
|
||||
5. 动态性
|
||||
6. 多线程
|
||||
7. 安全性、健壮性(没有指针和内存的管理、垃圾回收机制)
|
||||
|
||||
### JDK、JRE和JVM
|
||||
|
||||

|
||||
|
||||
|
||||
- JRE:Java Runtime Environment,Java 运行环境的简称,为 Java 的运行提供了所需的环境。它是一个 JVM 程序,主要包括了 JVM 的标准实现和一些 Java 基本类库。
|
||||
- JDK:Java Development Kit,Java 开发工具包,提供了 Java 的开发及运行环境。JDK 是 Java 开发的核心,集成了 JRE 以及一些其它的工具,比如编译 Java 源码的编译器 javac 等。
|
||||
|
||||
### 编译和解释
|
||||
|
||||
Java既需要编译也需要解释执行。
|
||||
1. Java编译器,将源代码转换成虚拟机能够识别的字节码。
|
||||
2. Java解释器,编译器识别字节码,转换为机器能够识别的机器码。
|
||||

|
||||
|
||||
|
||||
|
||||
|
||||
### Java 各版本的新特性
|
||||
|
||||
**New highlights in Java SE 8**
|
||||
|
||||
1. Lambda Expressions
|
||||
2. Pipelines and Streams
|
||||
3. Date and Time API
|
||||
4. Default Methods
|
||||
5. Type Annotations
|
||||
6. Nashhorn JavaScript Engine
|
||||
7. Concurrent Accumulators
|
||||
8. Parallel operations
|
||||
9. PermGen Error Removed
|
||||
|
||||
**New highlights in Java SE 7**
|
||||
|
||||
1. Strings in Switch Statement
|
||||
2. Type Inference for Generic Instance Creation
|
||||
3. Multiple Exception Handling
|
||||
4. Support for Dynamic Languages
|
||||
5. Try with Resources
|
||||
6. Java nio Package
|
||||
7. Binary Literals, Underscore in literals
|
||||
8. Diamond Syntax
|
||||
|
||||
- [Difference between Java 1.8 and Java 1.7?](http://www.selfgrowth.com/articles/difference-between-java-18-and-java-17)
|
||||
- [Java 8 特性](http://www.importnew.com/19345.html)
|
||||
|
||||
### Java 与 C++ 的区别
|
||||
|
||||
- Java 是纯粹的面向对象语言,所有的对象都继承自 java.lang.Object,C++ 为了兼容 C 即支持面向对象也支持面向过程。
|
||||
- Java 通过虚拟机从而实现跨平台特性,但是 C++ 依赖于特定的平台。
|
||||
- Java 没有指针,它的引用可以理解为安全指针,而 C++ 具有和 C 一样的指针。
|
||||
- Java 支持自动垃圾回收,而 C++ 需要手动回收。
|
||||
- Java 不支持多重继承,只能通过实现多个接口来达到相同目的,而 C++ 支持多重继承。
|
||||
- Java 不支持操作符重载,虽然可以对两个 String 对象执行加法运算,但是这是语言内置支持的操作,不属于操作符重载,而 C++ 可以。
|
||||
- Java 的 goto 是保留字,但是不可用,C++ 可以使用 goto。
|
||||
|
||||
[What are the main differences between Java and C++?](http://cs-fundamentals.com/tech-interview/java/differences-between-java-and-cpp.php)
|
||||
|
||||
### 第一个Java程序
|
||||
|
||||

|
||||
|
||||
|
||||
### 位、字节、字符、字长
|
||||
|
||||
1. 位,bit
|
||||
2. 字节,8,16位
|
||||
3. 字符,计算机中使用的字母、数字和符号
|
||||
4. 字、字长,操作系统的寻址空间。
|
||||
|
||||
## 1 注释、标识符和关键字
|
||||
|
||||
### 注释
|
||||
```java
|
||||
//单行注释
|
||||
|
||||
/*
|
||||
多行注释
|
||||
*/
|
||||
```
|
||||
|
||||
``` java
|
||||
/**
|
||||
* Java Doc 中的祖师格式
|
||||
* /
|
||||
```
|
||||
|
||||
### 标识符
|
||||
标识变量、方法、类和对象的名字。
|
||||
* 所有的标识符都应该以字母(A-Z 或者 a-z),美元符($)、或者下划线(_)开始
|
||||
* 首字符之后可以是字母(A-Z 或者 a-z),美元符($)、下划线(_)或数字的任何字符组合
|
||||
* 关键字不能用作标识符
|
||||
* 标识符是大小写敏感的
|
||||
|
||||
### 关键字
|
||||
|
||||
| abstract | assert | boolean | break |
|
||||
|----------|--------------|----------|------------|
|
||||
| byte | case | catch | char |
|
||||
| class | const | continue | default |
|
||||
| do | double | else | enum |
|
||||
| extends | final | finally | float |
|
||||
| for | goto | if | implements |
|
||||
| import | instanceof | int | interface |
|
||||
| long | native | new | package |
|
||||
| private | protected | public | return |
|
||||
| short | static | strictfp | super |
|
||||
| switch | synchronized | this | throw |
|
||||
| throws | transient | try | void |
|
||||
| volatile | while |
|
||||
|
||||
|
||||
## 2 数据类型
|
||||
强类型语言,所有变量必须先定义后使用。可以分为
|
||||
1. 基本类型
|
||||
2. 引用类型
|
||||
3. 基本类型对应的引用类型,称为包装类型
|
||||
### 基本类型
|
||||
- 整数类型
|
||||
- byte/8
|
||||
- short/16
|
||||
- int/32
|
||||
- long/64
|
||||
- 浮点数类型
|
||||
- float/32
|
||||
- double/64
|
||||
- 字符类型
|
||||
- char/16
|
||||
- 布尔类型
|
||||
- boolean/1
|
||||
|
||||
boolean 只有两个值:true、false,可以使用 1 bit 来存储,但是具体大小没有明确规定。JVM 会在编译时期将 boolean 类型的数据转换为 int,使用 1 来表示 true,0 表示 false。JVM 支持 boolean 数组,但是是通过读写 byte 数组来实现的。
|
||||
|
||||
|
||||
> float和double的比较问题
|
||||
> * java里的相等判断是检查类型的。float和double之间无法直接判断是否相等。
|
||||
> * float和double采用科学技术发进行存储,对较大的值有很高的舍入误差。无法直接判断相等。
|
||||
> * 银行业务中数据应该使用BigDeceimal来表示钱,防止舍入误差的影响。
|
||||
|
||||
> 字符和数值类型可以相互转换
|
||||
> * 所有字符类型可以强制转换为数字, 本质上也是一种数字。
|
||||
> * 默认使用unicode编码,占用两个字节。
|
||||
> `char c = '\u0061'`表示字母a。
|
||||
|
||||
|
||||
|
||||
> 布尔类型
|
||||
> ```
|
||||
> boolean flag = true;
|
||||
> if(flag == true){}
|
||||
> if(flag){}
|
||||
> //代码精简
|
||||
> ```
|
||||
|
||||
### 引用类型
|
||||
由基本数据类型按照某种方式组合出来的类型。
|
||||
|
||||
1. 类(随机组合变量和方法)
|
||||
2. 接口(随机组合方法)
|
||||
3. 数组(顺序排列的变量)
|
||||
|
||||
### 包装类型
|
||||
|
||||
基本类型都有对应的包装类型,基本类型与其对应的包装类型之间的赋值使用自动装箱与拆箱完成。包装类型是基本类型对应的引用类型。
|
||||
|
||||
* byte,Byte
|
||||
* short,Short
|
||||
* int,Integer
|
||||
* long,Long
|
||||
* float,Float
|
||||
* double,Double,
|
||||
* char,Char
|
||||
* boolean,Boolean
|
||||
|
||||
|
||||
|
||||
```java
|
||||
Integer x = 2; // 装箱 调用了 Integer.valueOf(2)
|
||||
int y = x; // 拆箱 调用了 X.intValue()
|
||||
```
|
||||
|
||||
- [Autoboxing and Unboxing](https://docs.oracle.com/javase/tutorial/java/data/autoboxing.html)
|
||||
|
||||
### 字面值
|
||||
|
||||
```java
|
||||
int i=10;//十进制
|
||||
int i=010;//八进制
|
||||
int i=0x10//十六进制
|
||||
"这是一个字符串"//字符串的字面值
|
||||
```
|
||||
|
||||
### 转义字符
|
||||
|
||||
```
|
||||
\t 制表位
|
||||
\n 换行符
|
||||
```
|
||||
|
||||
|
||||
## 3 类型转换
|
||||
### 转换规则
|
||||
运算中不同类型的数据首先转换为同一类型然后进行运算。
|
||||
* 默认转换规则
|
||||
|
||||
```
|
||||
byte/short/char->int->long->float->double
|
||||
```
|
||||
* 自动类型转换,隐式类型转换,由低到高会自动进行类型转换
|
||||
* 强制类型转换,从高到低需要进行强制类型转换
|
||||
|
||||
> 注意事项
|
||||
> * 不能对布尔值进行转换
|
||||
> * 不能把对象转换为不相关的类型
|
||||
> * 转换的时候会存在内存溢出或者精度问题
|
||||
|
||||
### float 与 double
|
||||
|
||||
Java 不能隐式执行向下转型,因为这会使得精度降低。
|
||||
|
||||
1.1 字面量属于 double 类型,不能直接将 1.1 直接赋值给 float 变量,因为这是向下转型。
|
||||
|
||||
```java
|
||||
// float f = 1.1;
|
||||
```
|
||||
|
||||
1.1f 字面量才是 float 类型。
|
||||
|
||||
```java
|
||||
float f = 1.1f;
|
||||
```
|
||||
|
||||
### 隐式类型转换
|
||||
|
||||
因为字面量 1 是 int 类型,它比 short 类型精度要高,因此不能隐式地将 int 类型向下转型为 short 类型。
|
||||
|
||||
```java
|
||||
short s1 = 1;
|
||||
// s1 = s1 + 1;
|
||||
```
|
||||
|
||||
但是使用 += 或者 ++ 运算符会执行隐式类型转换。
|
||||
|
||||
```java
|
||||
s1 += 1;
|
||||
s1++;
|
||||
```
|
||||
|
||||
上面的语句相当于将 s1 + 1 的计算结果进行了向下转型:
|
||||
|
||||
```java
|
||||
s1 = (short) (s1 + 1);
|
||||
```
|
||||
|
||||
[StackOverflow : Why don't Java's +=, -=, *=, /= compound assignment operators require casting?](https://stackoverflow.com/questions/8710619/why-dont-javas-compound-assignment-operators-require-casting)
|
||||
|
||||
## 4 变量常量
|
||||
|
||||
### 变量
|
||||
可以变化的量。
|
||||
1. Java是一种强类型语言,每个变量都必须声明其类型。
|
||||
2. Java变量是程序中最基本的存储单元,其元素包括变量名,变量类型和作用域。
|
||||
|
||||
```
|
||||
数据类型 变量名 = 变量值;
|
||||
type varName [=value] [{,varName[=value]}];
|
||||
```
|
||||
|
||||
> 不建议在一行中定义多个值。提高程序的可读性。
|
||||
|
||||
|
||||
### 变量作用域
|
||||
|
||||
1. 类变量,static修饰的变量
|
||||
2. 实例变量,从属于对象的变量
|
||||
3. 局部变量,方法中的变量
|
||||
```java
|
||||
public class Variable{
|
||||
static int a =0;//类变量
|
||||
String str = "helloworld";//实例变量
|
||||
|
||||
public void method(){
|
||||
int i = 0;//局部变量
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
变量的范围是程序中该变量可以被引用的部分。
|
||||
|
||||
1. 方法内定义的变量被称为局部变量。局部变量的作用范围从声明开始,直到包含它的块结束。
|
||||
2. 局部变量必须声明才可以使用。
|
||||
3. 方法的参数范围涵盖整个方法。参数实际上是一个局部变量。
|
||||
4. for循环的初始化部分声明的变量,其作用范围在整个循环。循环体内声明的变量其适用范围是从它声明到循环体结束。它包含如下所示的变量声明:
|
||||
### 变量初始化
|
||||
实例变量初始化规则
|
||||
1. 如果没有初始化函数默认初始化Wie0
|
||||
2. 布尔值默认是false
|
||||
3. 引用变量的默认初始值都是null
|
||||
|
||||
|
||||
### 常量
|
||||
|
||||
1. 初始化后不能改变的值。
|
||||
2. 特殊的变量,值被设定后不能进行改变。
|
||||
3. 使用final声明常量。
|
||||
|
||||
### 变量的命名规则
|
||||
|
||||
1. 见名知意
|
||||
2. 类成员变量、局部变量,首字母小写驼峰命名helloWrold
|
||||
3. 常量,大写字母+下划线HELLO_WORLD
|
||||
4. 类名,HelloWorld
|
||||
5. 方法名,首字母小写+驼峰命名 helloWorld()
|
||||
|
||||
## 5 运算符
|
||||
|
||||
### 算术运算符
|
||||
| 操作符 | 描述 | 例子 |
|
||||
|-----|------------------|---------------------|
|
||||
| + | 加法-相加运算符两侧的值 | A+B等于30 |
|
||||
| - | 减法-左操作数减去右操作数 | A–B等于-10 |
|
||||
| * | 乘法-相乘操作符两侧的值 | A*B等于200 |
|
||||
| / | 除法-左操作数除以右操作数 | B/A等于2 |
|
||||
| % | 取余-左操作数除以右操作数的余数 | B%A等于0 |
|
||||
| ++ | 自增:操作数的值增加1 | B++或++B等于21(区别详见下文) |
|
||||
| -- | 自减:操作数的值减少1 | B--或--B等于19(区别详见下文) |
|
||||
|
||||
1. 前缀自增自减法(++a,--a): 先进行自增或者自减运算,再进行表达式运算。
|
||||
2. 后缀自增自减法(a++,a--): 先进行表达式运算,再进行自增或者自减运算
|
||||
|
||||
|
||||
### 关系运算符
|
||||
|
||||
| 运算符 | 描述 | 例子 |
|
||||
|--------------|------------------------------------|------------------|
|
||||
| == | 检查如果两个操作数的值是否相等,如果相等则条件为真。 | (A == B)为假。 |
|
||||
| != | 检查如果两个操作数的值是否相等,如果值不相等则条件为真。 | (A != B) 为真。 |
|
||||
| > | 检查左操作数的值是否大于右操作数的值,如果是那么条件为真。 | (A> B)为假。 |
|
||||
| < | 检查左操作数的值是否小于右操作数的值,如果是那么条件为真。 | (A <B)为真。 |
|
||||
| >= | 检查左操作数的值是否大于或等于右操作数的值,如果是那么条件为真。 | (A> = B)为假。 |
|
||||
| <= | 检查左操作数的值是否小于或等于右操作数的值,如果是那么条件为真。 | (A <= B)为真。 |
|
||||
|
||||
1. 基本类型的值可以直接使用关系运算符判断大小和相等。
|
||||
2. 引用类型(类的对象、类的实例)的变量,需要通过重写equals方法来判断两个变量是否相等。引用类型的等于判断,是判断两个对象的地址是否相等。
|
||||
### 位运算符
|
||||
Java定义了位运算符,应用于整数类型(int),长整型(long),短整型(short),字符型(char),和字节型(byte)等类型。
|
||||
|
||||
| 操作符 | 描述 | 例子 |
|
||||
|---------------------|--------------------------------------------|--------------------------------|
|
||||
| & | 如果相对应位都是1,则结果为1,否则为0 | (A&B),得到12,即0000 1100 |
|
||||
| | | 如果相对应位都是 0,则结果为 0,否则为 1 | (A | B)得到61,即 0011 1101 |
|
||||
| ^ | 如果相对应位值相同,则结果为0,否则为1 | (A ^ B)得到49,即 0011 0001 |
|
||||
| 〜 | 按位取反运算符翻转操作数的每一位,即0变成1,1变成0。 | (〜A)得到-61,即1100 0011 |
|
||||
| << | 按位左移运算符。左操作数按位左移右操作数指定的位数。 | A << 2得到240,即 1111 0000 |
|
||||
| >> | 按位右移运算符。左操作数按位右移右操作数指定的位数。 | A >> 2得到15即 1111 |
|
||||
| >>> | 按位右移补零操作符。左操作数的值按右操作数指定的位数右移,移动得到的空位以零填充。 | A>>>2得到15即0000 1111 |
|
||||
|
||||
|
||||
* 运算效率极高,可以用来实现高级的乘法、加法和指数运算。
|
||||
|
||||
### 逻辑运算符
|
||||
| 操作符 | 描述 | 例子 |
|
||||
|------------|--------------------------------------------------|--------------------|
|
||||
| && | 称为逻辑与运算符。当且仅当两个操作数都为真,条件才为真。 | (A&&B)为假。 |
|
||||
|
|
||||
`||` | 称为逻辑或操作符。如果任何两个操作数任何一个为真,条件为真。 | (A`||`B)为真。 |
|
||||
| ! | 称为逻辑非运算符。用来反转操作数的逻辑状态。如果条件为true,则逻辑非运算符将得到false。 | !(A&&B)为真。 |
|
||||
|
||||
* 短路运算。当使用与逻辑运算符时,在两个操作数都为true时,结果才为true,但是当得到第一个操作为false时,其结果就必定是false,这时候就不会再判断第二个操作了。
|
||||
|
||||
|
||||
### 赋值运算符
|
||||
|
||||
| 操作符 | 描述 | 例子 |
|
||||
|------------|--------------------------------|-----------------------------------|
|
||||
| = | 简单的赋值运算符,将右操作数的值赋给左侧操作数 | C = A + B将把A + B得到的值赋给C |
|
||||
| + = | 加和赋值操作符,它把左操作数和右操作数相加赋值给左操作数 | C + = A等价于C = C + A |
|
||||
| - = | 减和赋值操作符,它把左操作数和右操作数相减赋值给左操作数 | C - = A等价于C = C - A |
|
||||
| * = | 乘和赋值操作符,它把左操作数和右操作数相乘赋值给左操作数 | C * = A等价于C = C * A |
|
||||
| / = | 除和赋值操作符,它把左操作数和右操作数相除赋值给左操作数 | C / = A,C 与 A 同类型时等价于 C = C / A |
|
||||
| (%)= | 取模和赋值操作符,它把左操作数和右操作数取模后赋值给左操作数 | C%= A等价于C = C%A |
|
||||
| << = | 左移位赋值运算符 | C << = 2等价于C = C << 2 |
|
||||
| >> = | 右移位赋值运算符 | C >> = 2等价于C = C >> 2 |
|
||||
| &= | 按位与赋值运算符 | C&= 2等价于C = C&2 |
|
||||
| ^ = | 按位异或赋值操作符 | C ^ = 2等价于C = C ^ 2 |
|
||||
| | = | 按位或赋值操作符 | C | = 2等价于C = C | 2 |
|
||||
|
||||
|
||||
```java
|
||||
|
||||
// java 变量相加,字符串后边都会转换为字符串拼接,字符串前边的执行变量的运算
|
||||
int a=10,b=20;
|
||||
System.out.println(""+a+b);
|
||||
// 1020
|
||||
System.out.println(a+b+"");
|
||||
//30
|
||||
```
|
||||
### 条件运算符(?:)
|
||||
条件运算符也被称为三元运算符。该运算符有3个操作数,并且需要判断布尔表达式的值。该运算符的主要是决定哪个值应该赋值给变量。
|
||||
|
||||
|
||||
### instanceof 运算符
|
||||
该运算符用于操作对象实例,检查该对象是否是一个特定类型(类类型或接口类型)。
|
||||
|
||||
|
||||
### 运算符优先级
|
||||
|
||||
| 类别 | 操作符 | 关联性 |
|
||||
|----------|-----------------------------------------------------|------|
|
||||
| 后缀 | () [] . (点操作符) | 左到右 |
|
||||
| 一元 | expr++ expr-- | 从左到右 |
|
||||
| 一元 | ++expr --expr + - ~ ! | 从右到左 |
|
||||
| 乘性 | * /% | 左到右 |
|
||||
| 加性 | + - | 左到右 |
|
||||
| 移位 | >> >>> << | 左到右 |
|
||||
| 关系 | > >= < <= | 左到右 |
|
||||
| 相等 | == != | 左到右 |
|
||||
| 按位与 | & | 左到右 |
|
||||
| 按位异或 | ^ | 左到右 |
|
||||
| 按位或 | `|` | 左到右 |
|
||||
| 逻辑与 | && | 左到右 |
|
||||
| 逻辑或 | `| |` | 左到右 |
|
||||
| 条件 | ?: | 从右到左 |
|
||||
| 赋值 | = + = - = * = / =%= >> = << =&= ^ = | = | 从右到左 |
|
||||
| 逗号 | , | 左到右 |
|
||||
|
||||
## 6 包机制和JavaDoc
|
||||
|
||||
|
||||
### 包机制
|
||||
|
||||
1. 包是一种文件夹。利用公司域名倒置作为包名
|
||||
2. 包是默认的作用域。当前类会自动导入当前包作用域中的类和变量。
|
||||
3. 通过导入包中的类,可以使用其他包中的类。
|
||||
|
||||
|
||||
|
||||
### JavaDoc
|
||||
|
||||
```java
|
||||
/**
|
||||
* @author
|
||||
* @version 1.0
|
||||
* @since 1.
|
||||
*/
|
||||
public class Doc{
|
||||
String name;
|
||||
|
||||
/**
|
||||
* @param
|
||||
* @return
|
||||
* @throws
|
||||
*/
|
||||
public void get(){
|
||||
|
||||
}
|
||||
}
|
||||
```
|
||||
219
Java基础教程/Java语言基础/02 流程控制.md
Normal file
@@ -0,0 +1,219 @@
|
||||
|
||||
## 1 顺序结构
|
||||
1. java的基本结构
|
||||

|
||||
## 2 选择结构
|
||||
### if单选结构
|
||||
```
|
||||
public class Test {
|
||||
|
||||
public static void main(String args[]){
|
||||
int x = 10;
|
||||
|
||||
if( x < 20 ){
|
||||
System.out.print("这是 if 语句");
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
### if-else结构
|
||||
```
|
||||
public class Test {
|
||||
|
||||
public static void main(String args[]){
|
||||
int x = 30;
|
||||
|
||||
if( x < 20 ){
|
||||
System.out.print("这是 if 语句");
|
||||
}else{
|
||||
System.out.print("这是 else 语句");
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### if-else嵌套
|
||||
|
||||
```java
|
||||
public class Test {
|
||||
|
||||
public static void main(String args[]){
|
||||
int x = 30;
|
||||
int y = 10;
|
||||
|
||||
if( x == 30 ){
|
||||
if( y == 10 ){
|
||||
System.out.print("X = 30 and Y = 10");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
### switch
|
||||
|
||||
|
||||
1. switch 语句中的变量类型可以是: byte、short、int 或者 char。
|
||||
2. 从 Java SE 7 开始,switch 支持字符串 String 类型了,同时 case 标签必须为字符串常量或字面量。模式使用String的hashCode作为匹配方法。
|
||||
3. switch 不支持 long、float、double,是因为 switch 的设计初衷是对那些只有少数几个值的类型进行等值判断,如果值过于复杂,那么还是用 if 比较合适。
|
||||
|
||||
4. case穿透。如果case后没有break语句,则case条件成立后,会执行后续的所有代码,不会进行后续的判断。
|
||||
|
||||
|
||||
|
||||
```java
|
||||
switch(expression){
|
||||
case value :
|
||||
//语句
|
||||
break; //可选
|
||||
case value :
|
||||
//语句
|
||||
break; //可选
|
||||
//你可以有任意数量的case语句
|
||||
default : //可选
|
||||
//语句
|
||||
}
|
||||
|
||||
String s = "a";
|
||||
switch (s) {
|
||||
case "a":
|
||||
System.out.println("aaa");
|
||||
break;
|
||||
case "b":
|
||||
System.out.println("bbb");
|
||||
break;
|
||||
}
|
||||
```
|
||||
|
||||
## 3 循环结构
|
||||
|
||||
### while
|
||||
|
||||
```java
|
||||
public class Test {
|
||||
public static void main(String[] args) {
|
||||
int x = 10;
|
||||
while( x < 20 ) {
|
||||
System.out.print("value of x : " + x );
|
||||
x++;
|
||||
System.out.print("\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### do…while 循环
|
||||
对于 while 语句而言,如果不满足条件,则不能进入循环。但有时候我们需要即使不满足条件,也至少执行一次。
|
||||
|
||||
do…while 循环和 while 循环相似,不同的是,do…while **循环至少会执行一次**。
|
||||
|
||||
```java
|
||||
public class Test {
|
||||
public static void main(String[] args){
|
||||
int x = 10;
|
||||
|
||||
do{
|
||||
System.out.print("value of x : " + x );
|
||||
x++;
|
||||
System.out.print("\n");
|
||||
}while( x < 20 );
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
### for循环
|
||||
虽然所有循环结构都可以用 while 或者 do...while表示,但 Java 提供了另一种语句 —— for 循环,使一些循环结构变得更加简单。
|
||||
|
||||
for循环执行的次数是在执行前就确定的。语法格式如下:
|
||||
```java
|
||||
for(初始化; 布尔表达式; 更新) {
|
||||
//代码语句
|
||||
}
|
||||
|
||||
public class Test {
|
||||
public static void main(String[] args) {
|
||||
|
||||
for(int x = 10; x < 20; x = x+1) {
|
||||
System.out.print("value of x : " + x );
|
||||
System.out.print("\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
### 增强 for 循环
|
||||
用来遍历序列和集合。
|
||||
* 声明语句:声明新的局部变量,该变量的类型必须和数组元素的类型匹配。其作用域限定在循环语句块,其值与此时数组元素的值相等。
|
||||
|
||||
* 表达式:表达式是要访问的数组名,或者是返回值为数组的方法。
|
||||
```java
|
||||
for(声明语句 : 表达式)
|
||||
{
|
||||
//代码句子
|
||||
}
|
||||
|
||||
public class Test {
|
||||
public static void main(String[] args){
|
||||
int [] numbers = {10, 20, 30, 40, 50};
|
||||
|
||||
for(int x : numbers ){
|
||||
System.out.print( x );
|
||||
System.out.print(",");
|
||||
}
|
||||
System.out.print("\n");
|
||||
String [] names ={"James", "Larry", "Tom", "Lacy"};
|
||||
for( String name : names ) {
|
||||
System.out.print( name );
|
||||
System.out.print(",");
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
## 4 break&continue
|
||||
|
||||
### break 关键字
|
||||
break 主要用在循环语句或者 switch 语句中,用来跳出整个语句块。
|
||||
|
||||
break 跳出最里层的循环,并且继续执行该循环下面的语句。
|
||||
|
||||
```java
|
||||
public class Test {
|
||||
public static void main(String[] args) {
|
||||
int [] numbers = {10, 20, 30, 40, 50};
|
||||
|
||||
for(int x : numbers ) {
|
||||
// x 等于 30 时跳出循环
|
||||
if( x == 30 ) {
|
||||
break;
|
||||
}
|
||||
System.out.print( x );
|
||||
System.out.print("\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### continue 关键字
|
||||
continue 适用于任何循环控制结构中。作用是让程序立刻跳转到下一次循环的迭代。
|
||||
|
||||
在 for 循环中,continue 语句使程序立即跳转到更新语句。
|
||||
|
||||
在 while 或者 do…while 循环中,程序立即跳转到布尔表达式的判断语句。
|
||||
|
||||
```java
|
||||
public class Test {
|
||||
public static void main(String[] args) {
|
||||
int [] numbers = {10, 20, 30, 40, 50};
|
||||
|
||||
for(int x : numbers ) {
|
||||
if( x == 30 ) {
|
||||
continue;
|
||||
}
|
||||
System.out.print( x );
|
||||
System.out.print("\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
## 5 输入输出对象
|
||||
312
Java基础教程/Java语言基础/03 函数方法.md
Normal file
@@ -0,0 +1,312 @@
|
||||
## 1 概述
|
||||
|
||||
### 方法定义
|
||||
Java方法是语句的集合,在一起执行一个功能。
|
||||
* 方法是解决一类问题的步骤的有序组合。
|
||||
* 方法包含于类或对象中
|
||||
* 方法在程序中被创建,在其他地方被引用。
|
||||
|
||||
### 方法优点
|
||||
|
||||
1. 程序变得简短清晰
|
||||
2. 有利于程序的维护
|
||||
3. 提高程序开发的效率
|
||||
4. 提到了代码的重用性。
|
||||
|
||||
### 使用规则
|
||||
1. 命名,首字母小写,驼峰命名法。
|
||||
2. 原子性,一个方法值完成一个功能
|
||||
|
||||
|
||||
## 2 方法实现
|
||||
|
||||
### 方法定义
|
||||
|
||||
```java
|
||||
修饰符 返回值类型 方法名(参数类型 参数名){
|
||||
...
|
||||
方法体
|
||||
...
|
||||
return 返回值;
|
||||
}
|
||||
```
|
||||

|
||||
* 修饰符:修饰符,这是可选的,告诉编译器如何调用该方法。定义了该方法的访问类型。
|
||||
* 返回值类型 :方法可能会返回值。returnValueType 是方法返回值的数据类型。有些方法执行所需的操作,但没有返回值。在这种情况下,returnValueType 是关键字void。
|
||||
* 方法名:是方法的实际名称。方法名和参数表共同构成方法签名。
|
||||
* 参数类型:参数像是一个占位符。当方法被调用时,传递值给参数。这个值被称为实参或变量。参数列表是指方法的参数类型、顺序和参数的个数。参数是可选的,方法可以不包含任何参数。
|
||||
* 方法体:方法体包含具体的语句,定义该方法的功能。
|
||||
|
||||
|
||||
|
||||
### 方法调用
|
||||
|
||||
* 当程序调用一个方法时,程序的控制权交给了被调用的方法。当被调用方法的返回语句执行或者到达方法体闭括号时候交还控制权给程序。
|
||||
|
||||
* 当方法返回一个值的时候,方法调用通常被当做一个值。
|
||||
|
||||
```java
|
||||
public class TestMax {
|
||||
/** 主方法 */
|
||||
public static void main(String[] args) {
|
||||
int i = 5;
|
||||
int j = 2;
|
||||
int k = max(i, j);
|
||||
System.out.println( i + " 和 " + j + " 比较,最大值是:" + k);
|
||||
}
|
||||
|
||||
/** 返回两个整数变量较大的值 */
|
||||
public static int max(int num1, int num2) {
|
||||
int result;
|
||||
if (num1 > num2)
|
||||
result = num1;
|
||||
else
|
||||
result = num2;
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### void关键字
|
||||
|
||||
void修饰的方法,没有返回值。只能作为单独的语句执行。
|
||||
|
||||
```java
|
||||
public class TestVoidMethod {
|
||||
public static void main(String[] args) {
|
||||
printGrade(78.5);
|
||||
}
|
||||
|
||||
public static void printGrade(double score) {
|
||||
if (score >= 90.0) {
|
||||
System.out.println('A');
|
||||
}
|
||||
else if (score >= 80.0) {
|
||||
System.out.println('B');
|
||||
}
|
||||
else if (score >= 70.0) {
|
||||
System.out.println('C');
|
||||
}
|
||||
else if (score >= 60.0) {
|
||||
System.out.println('D');
|
||||
}
|
||||
else {
|
||||
System.out.println('F');
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
### 参数传递
|
||||
|
||||
Java 的参数是以值传递的形式传入方法中,而不是引用传递。
|
||||
|
||||
以下代码中 Dog dog 的 dog 是一个指针,存储的是对象的地址。在将一个参数传入一个方法时,本质上是将对象的地址以值的方式传递到形参中。
|
||||
|
||||
```java
|
||||
public class Dog {
|
||||
|
||||
String name;
|
||||
|
||||
Dog(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
String getName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
String getObjectAddress() {
|
||||
return super.toString();
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
在方法中改变对象的字段值会改变原对象该字段值,因为引用的是同一个对象。
|
||||
|
||||
```java
|
||||
class PassByValueExample {
|
||||
public static void main(String[] args) {
|
||||
Dog dog = new Dog("A");
|
||||
func(dog);
|
||||
System.out.println(dog.getName()); // B
|
||||
}
|
||||
|
||||
private static void func(Dog dog) {
|
||||
dog.setName("B");
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
但是在方法中将变量引用了其它对象,那么此时方法里和方法外的两个变量指向了不同的对象,在一个指针改变其所指向对象的内容对另一个指针所指向的对象没有影响。
|
||||
|
||||
```java
|
||||
public class PassByValueExample {
|
||||
public static void main(String[] args) {
|
||||
Dog dog = new Dog("A");
|
||||
System.out.println(dog.getObjectAddress()); // Dog@4554617c
|
||||
func(dog);
|
||||
System.out.println(dog.getObjectAddress()); // Dog@4554617c
|
||||
System.out.println(dog.getName()); // A
|
||||
}
|
||||
|
||||
private static void func(Dog dog) {
|
||||
System.out.println(dog.getObjectAddress()); // Dog@4554617c
|
||||
dog = new Dog("B");
|
||||
System.out.println(dog.getObjectAddress()); // Dog@74a14482
|
||||
System.out.println(dog.getName()); // B
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## 3 高级用法
|
||||
|
||||
### 构造方法
|
||||
当一个对象被创建时候,构造方法用来初始化该对象。构造方法和它所在类的名字相同,但构造方法没有返回值。
|
||||
|
||||
通常会使用构造方法给一个类的实例变量赋初值,或者执行其它必要的步骤来创建一个完整的对象。
|
||||
|
||||
不管你是否自定义构造方法,所有的类都有构造方法, Java 自动提供了一个默认构造方法,默认构造方法的访问修饰符和类的访问修饰符相同(类为 public,构造函数也为 public;类改为 protected,构造函数也改为 protected)。一旦你定义了自己的构造方法,默认构造方法就会失效。
|
||||
|
||||
```java
|
||||
|
||||
// 一个简单的构造函数
|
||||
class MyClass {
|
||||
int x;
|
||||
|
||||
// 以下是构造函数
|
||||
MyClass() {
|
||||
x = 10;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### finalize()方法
|
||||
Java 允许定义这样的方法,它在对象被垃圾收集器析构(回收)之前调用,这个方法叫做 finalize( ),它用来清除回收对象。
|
||||
|
||||
例如,你可以使用 finalize() 来确保一个对象打开的文件被关闭了。
|
||||
|
||||
在 finalize() 方法里,你必须指定在对象销毁时候要执行的操作。
|
||||
|
||||
```java
|
||||
finalize() 一般格式是:
|
||||
|
||||
protected void finalize()
|
||||
{
|
||||
// 在这里终结代码
|
||||
}
|
||||
```
|
||||
关键字 protected 是一个限定符,它确保 finalize() 方法不会被该类以外的代码调用。
|
||||
|
||||
当然,Java 的内存回收可以由 JVM 来自动完成。如果你手动使用,则可以使用上面的方法。
|
||||
|
||||
```java
|
||||
public class FinalizationDemo {
|
||||
public static void main(String[] args) {
|
||||
Cake c1 = new Cake(1);
|
||||
Cake c2 = new Cake(2);
|
||||
Cake c3 = new Cake(3);
|
||||
|
||||
c2 = c3 = null;
|
||||
System.gc(); //调用Java垃圾收集器
|
||||
}
|
||||
}
|
||||
|
||||
class Cake extends Object {
|
||||
private int id;
|
||||
public Cake(int id) {
|
||||
this.id = id;
|
||||
System.out.println("Cake Object " + id + "is created");
|
||||
}
|
||||
|
||||
protected void finalize() throws java.lang.Throwable {
|
||||
super.finalize();
|
||||
System.out.println("Cake Object " + id + "is disposed");
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
### 方法重载
|
||||
|
||||
多个重名函数,具有不同的参数。类的两个方法拥有相同的名字,但是有不同的参数列表。Java编译器根据方法签名判断哪个方法应该被调用。方法签名由方法名称和参数列表共同决定。
|
||||
|
||||
```java
|
||||
public static double max(int num1, int num2) {
|
||||
if (num1 > num2)
|
||||
return num1;
|
||||
else
|
||||
return num2;
|
||||
}
|
||||
public static double max(double num1, double num2) {
|
||||
if (num1 > num2)
|
||||
return num1;
|
||||
else
|
||||
return num2;
|
||||
}
|
||||
```
|
||||
* 隐式类型转换与方法重载?谁优先?
|
||||
* 默认参数与方法重载?谁优先?
|
||||
### 可变参数
|
||||
Java支持传递同类型的可变参数给一个方法。
|
||||
|
||||
方法的可变参数的声明如下所示:
|
||||
|
||||
typeName... parameterName
|
||||
在方法声明中,在指定参数类型后加一个省略号(...) 。
|
||||
|
||||
一个方法中只能指定一个可变参数,它必须是方法的最后一个参数。任何普通的参数必须在它之前声明。
|
||||
|
||||
|
||||
```java
|
||||
VarargsDemo.java 文件代码:
|
||||
public class VarargsDemo {
|
||||
public static void main(String[] args) {
|
||||
// 调用可变参数的方法
|
||||
printMax(34, 3, 3, 2, 56.5);
|
||||
printMax(new double[]{1, 2, 3});
|
||||
}
|
||||
|
||||
public static void printMax( double... numbers) {
|
||||
if (numbers.length == 0) {
|
||||
System.out.println("No argument passed");
|
||||
return;
|
||||
}
|
||||
|
||||
double result = numbers[0];
|
||||
|
||||
for (int i = 1; i < numbers.length; i++){
|
||||
if (numbers[i] > result) {
|
||||
result = numbers[i];
|
||||
}
|
||||
}
|
||||
System.out.println("The max value is " + result);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
### 命令行传参
|
||||
命令行参数是在执行程序时候紧跟在程序名字后面的信息。
|
||||
```java
|
||||
public class CommandLine {
|
||||
public static void main(String[] args){
|
||||
for(int i=0; i<args.length; i++){
|
||||
System.out.println("args[" + i + "]: " + args[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
$ javac CommandLine.java
|
||||
$ java CommandLine this is a command line 200 -100
|
||||
args[0]: this
|
||||
args[1]: is
|
||||
args[2]: a
|
||||
args[3]: command
|
||||
args[4]: line
|
||||
args[5]: 200
|
||||
args[6]: -100
|
||||
```
|
||||
109
Java基础教程/Java语言基础/04 Java数组.md
Normal file
@@ -0,0 +1,109 @@
|
||||
## 1 概述
|
||||
|
||||
### 概念
|
||||
|
||||
Java 语言中提供的数组是用来存储固定大小的同类型元素。
|
||||
|
||||
### 数组声明
|
||||
```java
|
||||
dataType[] arrayRefVar; // 首选的方法
|
||||
dataType arrayRefVar[]; // 效果相同,但不是首选方法
|
||||
```
|
||||
|
||||
### 数组定义
|
||||
1. 使用new关键字和数组的大小创建数组。数组中的每一个元素都使用默认初始化。基本类型被初始化位数值,引用类型被初始化位空。
|
||||
2. 使用花括号和数组中的元素,创建数组
|
||||
```java
|
||||
dataType[] arrayRefVar = new dataType[arraySize];
|
||||
dataType[] arrayRefVar = {value0, value1, ..., valuek};
|
||||
```
|
||||
|
||||
|
||||
### 数组遍历
|
||||
|
||||
数组的元素类型和数组的大小都是确定的,所以当处理数组元素时候,我们通常使用基本循环或者 For-Each 循环。
|
||||
* for遍历
|
||||
```java
|
||||
public class TestArray {
|
||||
public static void main(String[] args) {
|
||||
double[] myList = {1.9, 2.9, 3.4, 3.5};
|
||||
|
||||
// 打印所有数组元素
|
||||
for (int i = 0; i < myList.length; i++) {
|
||||
System.out.println(myList[i] + " ");
|
||||
}
|
||||
// 计算所有元素的总和
|
||||
double total = 0;
|
||||
for (int i = 0; i < myList.length; i++) {
|
||||
total += myList[i];
|
||||
}
|
||||
System.out.println("Total is " + total);
|
||||
// 查找最大元素
|
||||
double max = myList[0];
|
||||
for (int i = 1; i < myList.length; i++) {
|
||||
if (myList[i] > max) max = myList[i];
|
||||
}
|
||||
System.out.println("Max is " + max);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
* forEach遍历
|
||||
```
|
||||
public class TestArray {
|
||||
public static void main(String[] args) {
|
||||
double[] myList = {1.9, 2.9, 3.4, 3.5};
|
||||
|
||||
// 打印所有数组元素
|
||||
for (double element: myList) {
|
||||
System.out.println(element);
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### 数组参数
|
||||
|
||||
数组可以作为参数传递给方法,本质是,数组是引用类型的变量的一种,所以传递的是数组的地址。
|
||||
```java
|
||||
public static void printArray(int[] array) {
|
||||
for (int i = 0; i < array.length; i++) {
|
||||
System.out.print(array[i] + " ");
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### 数组返回值
|
||||
|
||||
```java
|
||||
public static int[] reverse(int[] list) {
|
||||
int[] result = new int[list.length];
|
||||
|
||||
for (int i = 0, j = result.length - 1; i < list.length; i++, j--) {
|
||||
result[j] = list[i];
|
||||
}
|
||||
return result;
|
||||
}
|
||||
```
|
||||
|
||||
### 多维数组
|
||||
多维数组可以看成是数组的数组,比如二维数组就是一个特殊的一维数组,其每一个元素都是一个一维数组,
|
||||
|
||||
1. 可以直接固定每一维的数组长度
|
||||
```java
|
||||
String[][] str = new String[3][4];
|
||||
int[][] a = new int[2][3];
|
||||
```
|
||||
|
||||
2. 可以逐步分配每一维数组的长度
|
||||
|
||||
```java
|
||||
String[][] s = new String[2][];
|
||||
s[0] = new String[2];
|
||||
s[1] = new String[3];
|
||||
s[0][0] = new String("Good");
|
||||
s[0][1] = new String("Luck");
|
||||
s[1][0] = new String("to");
|
||||
s[1][1] = new String("you");
|
||||
s[1][2] = new String("!");
|
||||
```
|
||||
@@ -1,625 +1,14 @@
|
||||
# Java 基础
|
||||
<!-- GFM-TOC -->
|
||||
* [Java 基础](#java-基础)
|
||||
* [一、数据类型](#一数据类型)
|
||||
* [基本类型](#基本类型)
|
||||
* [包装类型](#包装类型)
|
||||
* [缓存池](#缓存池)
|
||||
* [二、String](#二string)
|
||||
* [概览](#概览)
|
||||
* [不可变的好处](#不可变的好处)
|
||||
* [String, StringBuffer and StringBuilder ](#string-stringbuffer-and-stringbuilder )
|
||||
* [String Pool](#string-pool)
|
||||
* [new String("abc")](#new-stringabc)
|
||||
* [三、运算](#三运算)
|
||||
* [参数传递](#参数传递)
|
||||
* [float 与 double](#float-与-double)
|
||||
* [隐式类型转换](#隐式类型转换)
|
||||
* [switch](#switch)
|
||||
* [四、关键字](#四关键字)
|
||||
* [final](#final)
|
||||
* [static](#static)
|
||||
* [五、Object 通用方法](#五object-通用方法)
|
||||
* [概览](#概览)
|
||||
* [equals()](#equals)
|
||||
* [hashCode()](#hashcode)
|
||||
* [toString()](#tostring)
|
||||
* [clone()](#clone)
|
||||
* [六、继承](#六继承)
|
||||
* [访问权限](#访问权限)
|
||||
* [抽象类与接口](#抽象类与接口)
|
||||
* [super](#super)
|
||||
* [重写与重载](#重写与重载)
|
||||
* [七、反射](#七反射)
|
||||
* [八、异常](#八异常)
|
||||
* [九、泛型](#九泛型)
|
||||
* [十、注解](#十注解)
|
||||
* [十一、特性](#十一特性)
|
||||
* [Java 各版本的新特性](#java-各版本的新特性)
|
||||
* [Java 与 C++ 的区别](#java-与-c-的区别)
|
||||
* [JRE or JDK](#jre-or-jdk)
|
||||
* [参考资料](#参考资料)
|
||||
<!-- GFM-TOC -->
|
||||
## 类和对象
|
||||
|
||||
|
||||
## 一、数据类型
|
||||
|
||||
### 基本类型
|
||||
|
||||
- byte/8
|
||||
- char/16
|
||||
- short/16
|
||||
- int/32
|
||||
- float/32
|
||||
- long/64
|
||||
- double/64
|
||||
- boolean/\~
|
||||
## 封装和抽象
|
||||
|
||||
boolean 只有两个值:true、false,可以使用 1 bit 来存储,但是具体大小没有明确规定。JVM 会在编译时期将 boolean 类型的数据转换为 int,使用 1 来表示 true,0 表示 false。JVM 支持 boolean 数组,但是是通过读写 byte 数组来实现的。
|
||||
## 继承
|
||||
|
||||
- [Primitive Data Types](https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html)
|
||||
- [The Java® Virtual Machine Specification](https://docs.oracle.com/javase/specs/jvms/se8/jvms8.pdf)
|
||||
## 多态
|
||||
|
||||
### 包装类型
|
||||
|
||||
基本类型都有对应的包装类型,基本类型与其对应的包装类型之间的赋值使用自动装箱与拆箱完成。
|
||||
|
||||
```java
|
||||
Integer x = 2; // 装箱 调用了 Integer.valueOf(2)
|
||||
int y = x; // 拆箱 调用了 X.intValue()
|
||||
```
|
||||
|
||||
- [Autoboxing and Unboxing](https://docs.oracle.com/javase/tutorial/java/data/autoboxing.html)
|
||||
|
||||
### 缓存池
|
||||
|
||||
new Integer(123) 与 Integer.valueOf(123) 的区别在于:
|
||||
|
||||
- new Integer(123) 每次都会新建一个对象;
|
||||
- Integer.valueOf(123) 会使用缓存池中的对象,多次调用会取得同一个对象的引用。
|
||||
|
||||
```java
|
||||
Integer x = new Integer(123);
|
||||
Integer y = new Integer(123);
|
||||
System.out.println(x == y); // false
|
||||
Integer z = Integer.valueOf(123);
|
||||
Integer k = Integer.valueOf(123);
|
||||
System.out.println(z == k); // true
|
||||
```
|
||||
|
||||
valueOf() 方法的实现比较简单,就是先判断值是否在缓存池中,如果在的话就直接返回缓存池的内容。
|
||||
|
||||
```java
|
||||
public static Integer valueOf(int i) {
|
||||
if (i >= IntegerCache.low && i <= IntegerCache.high)
|
||||
return IntegerCache.cache[i + (-IntegerCache.low)];
|
||||
return new Integer(i);
|
||||
}
|
||||
```
|
||||
|
||||
在 Java 8 中,Integer 缓存池的大小默认为 -128\~127。
|
||||
|
||||
```java
|
||||
static final int low = -128;
|
||||
static final int high;
|
||||
static final Integer cache[];
|
||||
|
||||
static {
|
||||
// high value may be configured by property
|
||||
int h = 127;
|
||||
String integerCacheHighPropValue =
|
||||
sun.misc.VM.getSavedProperty("java.lang.Integer.IntegerCache.high");
|
||||
if (integerCacheHighPropValue != null) {
|
||||
try {
|
||||
int i = parseInt(integerCacheHighPropValue);
|
||||
i = Math.max(i, 127);
|
||||
// Maximum array size is Integer.MAX_VALUE
|
||||
h = Math.min(i, Integer.MAX_VALUE - (-low) -1);
|
||||
} catch( NumberFormatException nfe) {
|
||||
// If the property cannot be parsed into an int, ignore it.
|
||||
}
|
||||
}
|
||||
high = h;
|
||||
|
||||
cache = new Integer[(high - low) + 1];
|
||||
int j = low;
|
||||
for(int k = 0; k < cache.length; k++)
|
||||
cache[k] = new Integer(j++);
|
||||
|
||||
// range [-128, 127] must be interned (JLS7 5.1.7)
|
||||
assert IntegerCache.high >= 127;
|
||||
}
|
||||
```
|
||||
|
||||
编译器会在自动装箱过程调用 valueOf() 方法,因此多个值相同且值在缓存池范围内的 Integer 实例使用自动装箱来创建,那么就会引用相同的对象。
|
||||
|
||||
```java
|
||||
Integer m = 123;
|
||||
Integer n = 123;
|
||||
System.out.println(m == n); // true
|
||||
```
|
||||
|
||||
基本类型对应的缓冲池如下:
|
||||
|
||||
- boolean values true and false
|
||||
- all byte values
|
||||
- short values between -128 and 127
|
||||
- int values between -128 and 127
|
||||
- char in the range \u0000 to \u007F
|
||||
|
||||
在使用这些基本类型对应的包装类型时,如果该数值范围在缓冲池范围内,就可以直接使用缓冲池中的对象。
|
||||
|
||||
在 jdk 1.8 所有的数值类缓冲池中,Integer 的缓冲池 IntegerCache 很特殊,这个缓冲池的下界是 - 128,上界默认是 127,但是这个上界是可调的,在启动 jvm 的时候,通过 -XX:AutoBoxCacheMax=<size> 来指定这个缓冲池的大小,该选项在 JVM 初始化的时候会设定一个名为 java.lang.IntegerCache.high 系统属性,然后 IntegerCache 初始化的时候就会读取该系统属性来决定上界。
|
||||
|
||||
[StackOverflow : Differences between new Integer(123), Integer.valueOf(123) and just 123
|
||||
](https://stackoverflow.com/questions/9030817/differences-between-new-integer123-integer-valueof123-and-just-123)
|
||||
|
||||
## 二、String
|
||||
|
||||
### 概览
|
||||
|
||||
String 被声明为 final,因此它不可被继承。(Integer 等包装类也不能被继承)
|
||||
|
||||
在 Java 8 中,String 内部使用 char 数组存储数据。
|
||||
|
||||
```java
|
||||
public final class String
|
||||
implements java.io.Serializable, Comparable<String>, CharSequence {
|
||||
/** The value is used for character storage. */
|
||||
private final char value[];
|
||||
}
|
||||
```
|
||||
|
||||
在 Java 9 之后,String 类的实现改用 byte 数组存储字符串,同时使用 `coder` 来标识使用了哪种编码。
|
||||
|
||||
```java
|
||||
public final class String
|
||||
implements java.io.Serializable, Comparable<String>, CharSequence {
|
||||
/** The value is used for character storage. */
|
||||
private final byte[] value;
|
||||
|
||||
/** The identifier of the encoding used to encode the bytes in {@code value}. */
|
||||
private final byte coder;
|
||||
}
|
||||
```
|
||||
|
||||
value 数组被声明为 final,这意味着 value 数组初始化之后就不能再引用其它数组。并且 String 内部没有改变 value 数组的方法,因此可以保证 String 不可变。
|
||||
|
||||
### 不可变的好处
|
||||
|
||||
**1. 可以缓存 hash 值**
|
||||
|
||||
因为 String 的 hash 值经常被使用,例如 String 用做 HashMap 的 key。不可变的特性可以使得 hash 值也不可变,因此只需要进行一次计算。
|
||||
|
||||
**2. String Pool 的需要**
|
||||
|
||||
如果一个 String 对象已经被创建过了,那么就会从 String Pool 中取得引用。只有 String 是不可变的,才可能使用 String Pool。
|
||||
|
||||
<div align="center"> <img src="https://cs-notes-1256109796.cos.ap-guangzhou.myqcloud.com/image-20191210004132894.png"/> </div><br>
|
||||
|
||||
**3. 安全性**
|
||||
|
||||
String 经常作为参数,String 不可变性可以保证参数不可变。例如在作为网络连接参数的情况下如果 String 是可变的,那么在网络连接过程中,String 被改变,改变 String 的那一方以为现在连接的是其它主机,而实际情况却不一定是。
|
||||
|
||||
**4. 线程安全**
|
||||
|
||||
String 不可变性天生具备线程安全,可以在多个线程中安全地使用。
|
||||
|
||||
[Program Creek : Why String is immutable in Java?](https://www.programcreek.com/2013/04/why-string-is-immutable-in-java/)
|
||||
|
||||
### String, StringBuffer and StringBuilder
|
||||
|
||||
**1. 可变性**
|
||||
|
||||
- String 不可变
|
||||
- StringBuffer 和 StringBuilder 可变
|
||||
|
||||
**2. 线程安全**
|
||||
|
||||
- String 不可变,因此是线程安全的
|
||||
- StringBuilder 不是线程安全的
|
||||
- StringBuffer 是线程安全的,内部使用 synchronized 进行同步
|
||||
|
||||
[StackOverflow : String, StringBuffer, and StringBuilder](https://stackoverflow.com/questions/2971315/string-stringbuffer-and-stringbuilder)
|
||||
|
||||
### String Pool
|
||||
|
||||
字符串常量池(String Pool)保存着所有字符串字面量(literal strings),这些字面量在编译时期就确定。不仅如此,还可以使用 String 的 intern() 方法在运行过程将字符串添加到 String Pool 中。
|
||||
|
||||
当一个字符串调用 intern() 方法时,如果 String Pool 中已经存在一个字符串和该字符串值相等(使用 equals() 方法进行确定),那么就会返回 String Pool 中字符串的引用;否则,就会在 String Pool 中添加一个新的字符串,并返回这个新字符串的引用。
|
||||
|
||||
下面示例中,s1 和 s2 采用 new String() 的方式新建了两个不同字符串,而 s3 和 s4 是通过 s1.intern() 和 s2.intern() 方法取得同一个字符串引用。intern() 首先把 "aaa" 放到 String Pool 中,然后返回这个字符串引用,因此 s3 和 s4 引用的是同一个字符串。
|
||||
|
||||
```java
|
||||
String s1 = new String("aaa");
|
||||
String s2 = new String("aaa");
|
||||
System.out.println(s1 == s2); // false
|
||||
String s3 = s1.intern();
|
||||
String s4 = s2.intern();
|
||||
System.out.println(s3 == s4); // true
|
||||
```
|
||||
|
||||
如果是采用 "bbb" 这种字面量的形式创建字符串,会自动地将字符串放入 String Pool 中。
|
||||
|
||||
```java
|
||||
String s5 = "bbb";
|
||||
String s6 = "bbb";
|
||||
System.out.println(s5 == s6); // true
|
||||
```
|
||||
|
||||
在 Java 7 之前,String Pool 被放在运行时常量池中,它属于永久代。而在 Java 7,String Pool 被移到堆中。这是因为永久代的空间有限,在大量使用字符串的场景下会导致 OutOfMemoryError 错误。
|
||||
|
||||
- [StackOverflow : What is String interning?](https://stackoverflow.com/questions/10578984/what-is-string-interning)
|
||||
- [深入解析 String#intern](https://tech.meituan.com/in_depth_understanding_string_intern.html)
|
||||
|
||||
### new String("abc")
|
||||
|
||||
使用这种方式一共会创建两个字符串对象(前提是 String Pool 中还没有 "abc" 字符串对象)。
|
||||
|
||||
- "abc" 属于字符串字面量,因此编译时期会在 String Pool 中创建一个字符串对象,指向这个 "abc" 字符串字面量;
|
||||
- 而使用 new 的方式会在堆中创建一个字符串对象。
|
||||
|
||||
创建一个测试类,其 main 方法中使用这种方式来创建字符串对象。
|
||||
|
||||
```java
|
||||
public class NewStringTest {
|
||||
public static void main(String[] args) {
|
||||
String s = new String("abc");
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
使用 javap -verbose 进行反编译,得到以下内容:
|
||||
|
||||
```java
|
||||
// ...
|
||||
Constant pool:
|
||||
// ...
|
||||
#2 = Class #18 // java/lang/String
|
||||
#3 = String #19 // abc
|
||||
// ...
|
||||
#18 = Utf8 java/lang/String
|
||||
#19 = Utf8 abc
|
||||
// ...
|
||||
|
||||
public static void main(java.lang.String[]);
|
||||
descriptor: ([Ljava/lang/String;)V
|
||||
flags: ACC_PUBLIC, ACC_STATIC
|
||||
Code:
|
||||
stack=3, locals=2, args_size=1
|
||||
0: new #2 // class java/lang/String
|
||||
3: dup
|
||||
4: ldc #3 // String abc
|
||||
6: invokespecial #4 // Method java/lang/String."<init>":(Ljava/lang/String;)V
|
||||
9: astore_1
|
||||
// ...
|
||||
```
|
||||
|
||||
在 Constant Pool 中,#19 存储这字符串字面量 "abc",#3 是 String Pool 的字符串对象,它指向 #19 这个字符串字面量。在 main 方法中,0: 行使用 new #2 在堆中创建一个字符串对象,并且使用 ldc #3 将 String Pool 中的字符串对象作为 String 构造函数的参数。
|
||||
|
||||
以下是 String 构造函数的源码,可以看到,在将一个字符串对象作为另一个字符串对象的构造函数参数时,并不会完全复制 value 数组内容,而是都会指向同一个 value 数组。
|
||||
|
||||
```java
|
||||
public String(String original) {
|
||||
this.value = original.value;
|
||||
this.hash = original.hash;
|
||||
}
|
||||
```
|
||||
|
||||
## 三、运算
|
||||
|
||||
### 参数传递
|
||||
|
||||
Java 的参数是以值传递的形式传入方法中,而不是引用传递。
|
||||
|
||||
以下代码中 Dog dog 的 dog 是一个指针,存储的是对象的地址。在将一个参数传入一个方法时,本质上是将对象的地址以值的方式传递到形参中。
|
||||
|
||||
```java
|
||||
public class Dog {
|
||||
|
||||
String name;
|
||||
|
||||
Dog(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
String getName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
String getObjectAddress() {
|
||||
return super.toString();
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
在方法中改变对象的字段值会改变原对象该字段值,因为引用的是同一个对象。
|
||||
|
||||
```java
|
||||
class PassByValueExample {
|
||||
public static void main(String[] args) {
|
||||
Dog dog = new Dog("A");
|
||||
func(dog);
|
||||
System.out.println(dog.getName()); // B
|
||||
}
|
||||
|
||||
private static void func(Dog dog) {
|
||||
dog.setName("B");
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
但是在方法中将指针引用了其它对象,那么此时方法里和方法外的两个指针指向了不同的对象,在一个指针改变其所指向对象的内容对另一个指针所指向的对象没有影响。
|
||||
|
||||
```java
|
||||
public class PassByValueExample {
|
||||
public static void main(String[] args) {
|
||||
Dog dog = new Dog("A");
|
||||
System.out.println(dog.getObjectAddress()); // Dog@4554617c
|
||||
func(dog);
|
||||
System.out.println(dog.getObjectAddress()); // Dog@4554617c
|
||||
System.out.println(dog.getName()); // A
|
||||
}
|
||||
|
||||
private static void func(Dog dog) {
|
||||
System.out.println(dog.getObjectAddress()); // Dog@4554617c
|
||||
dog = new Dog("B");
|
||||
System.out.println(dog.getObjectAddress()); // Dog@74a14482
|
||||
System.out.println(dog.getName()); // B
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
[StackOverflow: Is Java “pass-by-reference” or “pass-by-value”?](https://stackoverflow.com/questions/40480/is-java-pass-by-reference-or-pass-by-value)
|
||||
|
||||
### float 与 double
|
||||
|
||||
Java 不能隐式执行向下转型,因为这会使得精度降低。
|
||||
|
||||
1.1 字面量属于 double 类型,不能直接将 1.1 直接赋值给 float 变量,因为这是向下转型。
|
||||
|
||||
```java
|
||||
// float f = 1.1;
|
||||
```
|
||||
|
||||
1.1f 字面量才是 float 类型。
|
||||
|
||||
```java
|
||||
float f = 1.1f;
|
||||
```
|
||||
|
||||
### 隐式类型转换
|
||||
|
||||
因为字面量 1 是 int 类型,它比 short 类型精度要高,因此不能隐式地将 int 类型向下转型为 short 类型。
|
||||
|
||||
```java
|
||||
short s1 = 1;
|
||||
// s1 = s1 + 1;
|
||||
```
|
||||
|
||||
但是使用 += 或者 ++ 运算符会执行隐式类型转换。
|
||||
|
||||
```java
|
||||
s1 += 1;
|
||||
s1++;
|
||||
```
|
||||
|
||||
上面的语句相当于将 s1 + 1 的计算结果进行了向下转型:
|
||||
|
||||
```java
|
||||
s1 = (short) (s1 + 1);
|
||||
```
|
||||
|
||||
[StackOverflow : Why don't Java's +=, -=, *=, /= compound assignment operators require casting?](https://stackoverflow.com/questions/8710619/why-dont-javas-compound-assignment-operators-require-casting)
|
||||
|
||||
### switch
|
||||
|
||||
从 Java 7 开始,可以在 switch 条件判断语句中使用 String 对象。
|
||||
|
||||
```java
|
||||
String s = "a";
|
||||
switch (s) {
|
||||
case "a":
|
||||
System.out.println("aaa");
|
||||
break;
|
||||
case "b":
|
||||
System.out.println("bbb");
|
||||
break;
|
||||
}
|
||||
```
|
||||
|
||||
switch 不支持 long、float、double,是因为 switch 的设计初衷是对那些只有少数几个值的类型进行等值判断,如果值过于复杂,那么还是用 if 比较合适。
|
||||
|
||||
```java
|
||||
// long x = 111;
|
||||
// switch (x) { // Incompatible types. Found: 'long', required: 'char, byte, short, int, Character, Byte, Short, Integer, String, or an enum'
|
||||
// case 111:
|
||||
// System.out.println(111);
|
||||
// break;
|
||||
// case 222:
|
||||
// System.out.println(222);
|
||||
// break;
|
||||
// }
|
||||
```
|
||||
|
||||
[StackOverflow : Why can't your switch statement data type be long, Java?](https://stackoverflow.com/questions/2676210/why-cant-your-switch-statement-data-type-be-long-java)
|
||||
|
||||
|
||||
## 四、关键字
|
||||
|
||||
### final
|
||||
|
||||
**1. 数据**
|
||||
|
||||
声明数据为常量,可以是编译时常量,也可以是在运行时被初始化后不能被改变的常量。
|
||||
|
||||
- 对于基本类型,final 使数值不变;
|
||||
- 对于引用类型,final 使引用不变,也就不能引用其它对象,但是被引用的对象本身是可以修改的。
|
||||
|
||||
```java
|
||||
final int x = 1;
|
||||
// x = 2; // cannot assign value to final variable 'x'
|
||||
final A y = new A();
|
||||
y.a = 1;
|
||||
```
|
||||
|
||||
**2. 方法**
|
||||
|
||||
声明方法不能被子类重写。
|
||||
|
||||
private 方法隐式地被指定为 final,如果在子类中定义的方法和基类中的一个 private 方法签名相同,此时子类的方法不是重写基类方法,而是在子类中定义了一个新的方法。
|
||||
|
||||
**3. 类**
|
||||
|
||||
声明类不允许被继承。
|
||||
|
||||
### static
|
||||
|
||||
**1. 静态变量**
|
||||
|
||||
- 静态变量:又称为类变量,也就是说这个变量属于类的,类所有的实例都共享静态变量,可以直接通过类名来访问它。静态变量在内存中只存在一份。
|
||||
- 实例变量:每创建一个实例就会产生一个实例变量,它与该实例同生共死。
|
||||
|
||||
```java
|
||||
public class A {
|
||||
|
||||
private int x; // 实例变量
|
||||
private static int y; // 静态变量
|
||||
|
||||
public static void main(String[] args) {
|
||||
// int x = A.x; // Non-static field 'x' cannot be referenced from a static context
|
||||
A a = new A();
|
||||
int x = a.x;
|
||||
int y = A.y;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**2. 静态方法**
|
||||
|
||||
静态方法在类加载的时候就存在了,它不依赖于任何实例。所以静态方法必须有实现,也就是说它不能是抽象方法。
|
||||
|
||||
```java
|
||||
public abstract class A {
|
||||
public static void func1(){
|
||||
}
|
||||
// public abstract static void func2(); // Illegal combination of modifiers: 'abstract' and 'static'
|
||||
}
|
||||
```
|
||||
|
||||
只能访问所属类的静态字段和静态方法,方法中不能有 this 和 super 关键字,因此这两个关键字与具体对象关联。
|
||||
|
||||
```java
|
||||
public class A {
|
||||
|
||||
private static int x;
|
||||
private int y;
|
||||
|
||||
public static void func1(){
|
||||
int a = x;
|
||||
// int b = y; // Non-static field 'y' cannot be referenced from a static context
|
||||
// int b = this.y; // 'A.this' cannot be referenced from a static context
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**3. 静态语句块**
|
||||
|
||||
静态语句块在类初始化时运行一次。
|
||||
|
||||
```java
|
||||
public class A {
|
||||
static {
|
||||
System.out.println("123");
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
A a1 = new A();
|
||||
A a2 = new A();
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
```html
|
||||
123
|
||||
```
|
||||
|
||||
**4. 静态内部类**
|
||||
|
||||
非静态内部类依赖于外部类的实例,也就是说需要先创建外部类实例,才能用这个实例去创建非静态内部类。而静态内部类不需要。
|
||||
|
||||
```java
|
||||
public class OuterClass {
|
||||
|
||||
class InnerClass {
|
||||
}
|
||||
|
||||
static class StaticInnerClass {
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
// InnerClass innerClass = new InnerClass(); // 'OuterClass.this' cannot be referenced from a static context
|
||||
OuterClass outerClass = new OuterClass();
|
||||
InnerClass innerClass = outerClass.new InnerClass();
|
||||
StaticInnerClass staticInnerClass = new StaticInnerClass();
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
静态内部类不能访问外部类的非静态的变量和方法。
|
||||
|
||||
**5. 静态导包**
|
||||
|
||||
在使用静态变量和方法时不用再指明 ClassName,从而简化代码,但可读性大大降低。
|
||||
|
||||
```java
|
||||
import static com.xxx.ClassName.*
|
||||
```
|
||||
|
||||
**6. 初始化顺序**
|
||||
|
||||
静态变量和静态语句块优先于实例变量和普通语句块,静态变量和静态语句块的初始化顺序取决于它们在代码中的顺序。
|
||||
|
||||
```java
|
||||
public static String staticField = "静态变量";
|
||||
```
|
||||
|
||||
```java
|
||||
static {
|
||||
System.out.println("静态语句块");
|
||||
}
|
||||
```
|
||||
|
||||
```java
|
||||
public String field = "实例变量";
|
||||
```
|
||||
|
||||
```java
|
||||
{
|
||||
System.out.println("普通语句块");
|
||||
}
|
||||
```
|
||||
|
||||
最后才是构造函数的初始化。
|
||||
|
||||
```java
|
||||
public InitialOrderTest() {
|
||||
System.out.println("构造函数");
|
||||
}
|
||||
```
|
||||
|
||||
存在继承的情况下,初始化顺序为:
|
||||
|
||||
- 父类(静态变量、静态语句块)
|
||||
- 子类(静态变量、静态语句块)
|
||||
- 父类(实例变量、普通语句块)
|
||||
- 父类(构造函数)
|
||||
- 子类(实例变量、普通语句块)
|
||||
- 子类(构造函数)
|
||||
|
||||
## 五、Object 通用方法
|
||||
|
||||
@@ -1377,17 +766,6 @@ Class 和 java.lang.reflect 一起对反射提供了支持,java.lang.reflect
|
||||
- [Trail: The Reflection API](https://docs.oracle.com/javase/tutorial/reflect/index.html)
|
||||
- [深入解析 Java 反射(1)- 基础](http://www.sczyh30.com/posts/Java/java-reflection-1/)
|
||||
|
||||
## 八、异常
|
||||
|
||||
Throwable 可以用来表示任何可以作为异常抛出的类,分为两种: **Error** 和 **Exception**。其中 Error 用来表示 JVM 无法处理的错误,Exception 分为两种:
|
||||
|
||||
- **受检异常** :需要用 try...catch... 语句捕获并进行处理,并且可以从异常中恢复;
|
||||
- **非受检异常** :是程序运行时错误,例如除 0 会引发 Arithmetic Exception,此时程序崩溃并且无法恢复。
|
||||
|
||||
<div align="center"> <img src="https://cs-notes-1256109796.cos.ap-guangzhou.myqcloud.com/PPjwP.png" width="600"/> </div><br>
|
||||
|
||||
- [Java 入门之异常处理](https://www.cnblogs.com/Blue-Keroro/p/8875898.html)
|
||||
- [Java Exception Interview Questions and Answers](https://www.journaldev.com/2167/java-exception-interview-questions-and-answersl)
|
||||
|
||||
## 九、泛型
|
||||
|
||||
@@ -1408,55 +786,3 @@ public class Box<T> {
|
||||
Java 注解是附加在代码中的一些元信息,用于一些工具在编译、运行时进行解析和使用,起到说明、配置的功能。注解不会也不能影响代码的实际逻辑,仅仅起到辅助性的作用。
|
||||
|
||||
[注解 Annotation 实现原理与自定义注解例子](https://www.cnblogs.com/acm-bingzi/p/javaAnnotation.html)
|
||||
|
||||
## 十一、特性
|
||||
|
||||
### Java 各版本的新特性
|
||||
|
||||
**New highlights in Java SE 8**
|
||||
|
||||
1. Lambda Expressions
|
||||
2. Pipelines and Streams
|
||||
3. Date and Time API
|
||||
4. Default Methods
|
||||
5. Type Annotations
|
||||
6. Nashhorn JavaScript Engine
|
||||
7. Concurrent Accumulators
|
||||
8. Parallel operations
|
||||
9. PermGen Error Removed
|
||||
|
||||
**New highlights in Java SE 7**
|
||||
|
||||
1. Strings in Switch Statement
|
||||
2. Type Inference for Generic Instance Creation
|
||||
3. Multiple Exception Handling
|
||||
4. Support for Dynamic Languages
|
||||
5. Try with Resources
|
||||
6. Java nio Package
|
||||
7. Binary Literals, Underscore in literals
|
||||
8. Diamond Syntax
|
||||
|
||||
- [Difference between Java 1.8 and Java 1.7?](http://www.selfgrowth.com/articles/difference-between-java-18-and-java-17)
|
||||
- [Java 8 特性](http://www.importnew.com/19345.html)
|
||||
|
||||
### Java 与 C++ 的区别
|
||||
|
||||
- Java 是纯粹的面向对象语言,所有的对象都继承自 java.lang.Object,C++ 为了兼容 C 即支持面向对象也支持面向过程。
|
||||
- Java 通过虚拟机从而实现跨平台特性,但是 C++ 依赖于特定的平台。
|
||||
- Java 没有指针,它的引用可以理解为安全指针,而 C++ 具有和 C 一样的指针。
|
||||
- Java 支持自动垃圾回收,而 C++ 需要手动回收。
|
||||
- Java 不支持多重继承,只能通过实现多个接口来达到相同目的,而 C++ 支持多重继承。
|
||||
- Java 不支持操作符重载,虽然可以对两个 String 对象执行加法运算,但是这是语言内置支持的操作,不属于操作符重载,而 C++ 可以。
|
||||
- Java 的 goto 是保留字,但是不可用,C++ 可以使用 goto。
|
||||
|
||||
[What are the main differences between Java and C++?](http://cs-fundamentals.com/tech-interview/java/differences-between-java-and-cpp.php)
|
||||
|
||||
### JRE or JDK
|
||||
|
||||
- JRE:Java Runtime Environment,Java 运行环境的简称,为 Java 的运行提供了所需的环境。它是一个 JVM 程序,主要包括了 JVM 的标准实现和一些 Java 基本类库。
|
||||
- JDK:Java Development Kit,Java 开发工具包,提供了 Java 的开发及运行环境。JDK 是 Java 开发的核心,集成了 JRE 以及一些其它的工具,比如编译 Java 源码的编译器 javac 等。
|
||||
|
||||
## 参考资料
|
||||
|
||||
- Eckel B. Java 编程思想[M]. 机械工业出版社, 2002.
|
||||
- Bloch J. Effective java[M]. Addison-Wesley Professional, 2017.
|
||||
11
Java基础教程/Java语言基础/06 异常处理.md
Normal file
@@ -0,0 +1,11 @@
|
||||
## 八、异常
|
||||
|
||||
Throwable 可以用来表示任何可以作为异常抛出的类,分为两种: **Error** 和 **Exception**。其中 Error 用来表示 JVM 无法处理的错误,Exception 分为两种:
|
||||
|
||||
- **受检异常** :需要用 try...catch... 语句捕获并进行处理,并且可以从异常中恢复;
|
||||
- **非受检异常** :是程序运行时错误,例如除 0 会引发 Arithmetic Exception,此时程序崩溃并且无法恢复。
|
||||
|
||||
<div align="center"> <img src="https://cs-notes-1256109796.cos.ap-guangzhou.myqcloud.com/PPjwP.png" width="600"/> </div><br>
|
||||
|
||||
- [Java 入门之异常处理](https://www.cnblogs.com/Blue-Keroro/p/8875898.html)
|
||||
- [Java Exception Interview Questions and Answers](https://www.journaldev.com/2167/java-exception-interview-questions-and-answersl)
|
||||
142
Java基础教程/Java语言基础/10 包装器类.md
Normal file
@@ -0,0 +1,142 @@
|
||||
## 0 概述
|
||||
|
||||
### 包装器类
|
||||
Java为了能将8种基本类型当对象来处理,能够连接相关的方法,设置了包装器类。
|
||||
|
||||
* byte—Byte
|
||||
* short—Short
|
||||
* int — Integer
|
||||
* long—Long
|
||||
* char—Character
|
||||
* float—Float
|
||||
* double—Double
|
||||
* boolean—Boolean
|
||||
|
||||
### 包装器类创建
|
||||
|
||||
由字面值或基本类型的变量创建包装器类对象的方法。
|
||||
|
||||
* 构造方法 new
|
||||
|
||||
```
|
||||
Integer i = new Interger(1);
|
||||
```
|
||||
* 调用包装器类型的valueOf方法
|
||||
|
||||
```
|
||||
Double d = Double.valueOf(3.14);
|
||||
```
|
||||
|
||||
### 包装器类转换
|
||||
|
||||
```java
|
||||
Boolean.booleanValue()
|
||||
Character.charValue()
|
||||
Byte.byteValue()
|
||||
Short.shortValue()
|
||||
Integer.intValue()
|
||||
Long.longValue()
|
||||
Float.floatValue()
|
||||
Double.doubleValue()
|
||||
```
|
||||
|
||||
* 装箱: 将基本类型转化为包装器类型 包装器类.valueOf(基本数据类型变量或常量)。装箱共享内存。
|
||||
* 拆箱:将包装器类型转化为基本数据类型XX.XXXvalue();拆箱也共享内存
|
||||
|
||||
```java
|
||||
Integer i = Integer.valueOf(10);//10是基本数据类型,i是包装器类型
|
||||
int n = i.intValue();//i是包装器类型,n是包装器类型
|
||||
```
|
||||
### 包装器类
|
||||
* 对象一旦赋值,其值不能在改变。
|
||||
* ++/--自增自减运算符只能对基本数据类型操作
|
||||
* 集合中只能存放帮装起类型的对象
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## 数据缓存池
|
||||
|
||||
new Integer(123) 与 Integer.valueOf(123) 的区别在于:
|
||||
|
||||
- new Integer(123) 每次都会新建一个对象;
|
||||
- Integer.valueOf(123) 会使用缓存池中的对象,多次调用会取得同一个对象的引用。
|
||||
|
||||
```java
|
||||
Integer x = new Integer(123);
|
||||
Integer y = new Integer(123);
|
||||
System.out.println(x == y); // false
|
||||
Integer z = Integer.valueOf(123);
|
||||
Integer k = Integer.valueOf(123);
|
||||
System.out.println(z == k); // true
|
||||
```
|
||||
|
||||
valueOf() 方法的实现比较简单,就是先判断值是否在缓存池中,如果在的话就直接返回缓存池的内容。
|
||||
|
||||
```java
|
||||
public static Integer valueOf(int i) {
|
||||
if (i >= IntegerCache.low && i <= IntegerCache.high)
|
||||
return IntegerCache.cache[i + (-IntegerCache.low)];
|
||||
return new Integer(i);
|
||||
}
|
||||
```
|
||||
|
||||
在 Java 8 中,Integer 缓存池的大小默认为 -128\~127。
|
||||
|
||||
```java
|
||||
static final int low = -128;
|
||||
static final int high;
|
||||
static final Integer cache[];
|
||||
|
||||
static {
|
||||
// high value may be configured by property
|
||||
int h = 127;
|
||||
String integerCacheHighPropValue =
|
||||
sun.misc.VM.getSavedProperty("java.lang.Integer.IntegerCache.high");
|
||||
if (integerCacheHighPropValue != null) {
|
||||
try {
|
||||
int i = parseInt(integerCacheHighPropValue);
|
||||
i = Math.max(i, 127);
|
||||
// Maximum array size is Integer.MAX_VALUE
|
||||
h = Math.min(i, Integer.MAX_VALUE - (-low) -1);
|
||||
} catch( NumberFormatException nfe) {
|
||||
// If the property cannot be parsed into an int, ignore it.
|
||||
}
|
||||
}
|
||||
high = h;
|
||||
|
||||
cache = new Integer[(high - low) + 1];
|
||||
int j = low;
|
||||
for(int k = 0; k < cache.length; k++)
|
||||
cache[k] = new Integer(j++);
|
||||
|
||||
// range [-128, 127] must be interned (JLS7 5.1.7)
|
||||
assert IntegerCache.high >= 127;
|
||||
}
|
||||
```
|
||||
|
||||
编译器会在自动装箱过程调用 valueOf() 方法,因此多个值相同且值在缓存池范围内的 Integer 实例使用自动装箱来创建,那么就会引用相同的对象。
|
||||
|
||||
```java
|
||||
Integer m = 123;
|
||||
Integer n = 123;
|
||||
System.out.println(m == n); // true
|
||||
```
|
||||
|
||||
基本类型对应的缓冲池如下:
|
||||
|
||||
- boolean values true and false
|
||||
- all byte values
|
||||
- short values between -128 and 127
|
||||
- int values between -128 and 127
|
||||
- char in the range \u0000 to \u007F
|
||||
|
||||
在使用这些基本类型对应的包装类型时,如果该数值范围在缓冲池范围内,就可以直接使用缓冲池中的对象。
|
||||
|
||||
在 jdk 1.8 所有的数值类缓冲池中,Integer 的缓冲池 IntegerCache 很特殊,这个缓冲池的下界是 - 128,上界默认是 127,但是这个上界是可调的,在启动 jvm 的时候,通过 -XX:AutoBoxCacheMax=<size> 来指定这个缓冲池的大小,该选项在 JVM 初始化的时候会设定一个名为 java.lang.IntegerCache.high 系统属性,然后 IntegerCache 初始化的时候就会读取该系统属性来决定上界。
|
||||
|
||||
[StackOverflow : Differences between new Integer(123), Integer.valueOf(123) and just 123
|
||||
](https://stackoverflow.com/questions/9030817/differences-between-new-integer123-integer-valueof123-and-just-123)
|
||||
|
||||
|
||||
166
Java基础教程/Java语言基础/11 String&StringBuffer类.md
Normal file
@@ -0,0 +1,166 @@
|
||||
|
||||
|
||||
## 2.3 String
|
||||
|
||||
### 概览
|
||||
|
||||
String 被声明为 final,因此它不可被继承。(Integer 等包装类也不能被继承)
|
||||
|
||||
在 Java 8 中,String 内部使用 char 数组存储数据。
|
||||
|
||||
```java
|
||||
public final class String
|
||||
implements java.io.Serializable, Comparable<String>, CharSequence {
|
||||
/** The value is used for character storage. */
|
||||
private final char value[];
|
||||
}
|
||||
```
|
||||
|
||||
在 Java 9 之后,String 类的实现改用 byte 数组存储字符串,同时使用 `coder` 来标识使用了哪种编码。
|
||||
|
||||
```java
|
||||
public final class String
|
||||
implements java.io.Serializable, Comparable<String>, CharSequence {
|
||||
/** The value is used for character storage. */
|
||||
private final byte[] value;
|
||||
|
||||
/** The identifier of the encoding used to encode the bytes in {@code value}. */
|
||||
private final byte coder;
|
||||
}
|
||||
```
|
||||
|
||||
value 数组被声明为 final,这意味着 value 数组初始化之后就不能再引用其它数组。并且 String 内部没有改变 value 数组的方法,因此可以保证 String 不可变。
|
||||
|
||||
### 不可变的好处
|
||||
|
||||
**1. 可以缓存 hash 值**
|
||||
|
||||
因为 String 的 hash 值经常被使用,例如 String 用做 HashMap 的 key。不可变的特性可以使得 hash 值也不可变,因此只需要进行一次计算。
|
||||
|
||||
**2. String Pool 的需要**
|
||||
|
||||
如果一个 String 对象已经被创建过了,那么就会从 String Pool 中取得引用。只有 String 是不可变的,才可能使用 String Pool。
|
||||
|
||||
<div align="center"> <img src="https://cs-notes-1256109796.cos.ap-guangzhou.myqcloud.com/image-20191210004132894.png"/> </div><br>
|
||||
|
||||
**3. 安全性**
|
||||
|
||||
String 经常作为参数,String 不可变性可以保证参数不可变。例如在作为网络连接参数的情况下如果 String 是可变的,那么在网络连接过程中,String 被改变,改变 String 的那一方以为现在连接的是其它主机,而实际情况却不一定是。
|
||||
|
||||
**4. 线程安全**
|
||||
|
||||
String 不可变性天生具备线程安全,可以在多个线程中安全地使用。
|
||||
|
||||
[Program Creek : Why String is immutable in Java?](https://www.programcreek.com/2013/04/why-string-is-immutable-in-java/)
|
||||
|
||||
### String, StringBuffer and StringBuilder
|
||||
|
||||
**1. 可变性**
|
||||
|
||||
- String 不可变
|
||||
- StringBuffer 和 StringBuilder 可变
|
||||
|
||||
**2. 线程安全**
|
||||
|
||||
- String 不可变,因此是线程安全的
|
||||
- StringBuilder 不是线程安全的
|
||||
- StringBuffer 是线程安全的,内部使用 synchronized 进行同步
|
||||
|
||||
[StackOverflow : String, StringBuffer, and StringBuilder](https://stackoverflow.com/questions/2971315/string-stringbuffer-and-stringbuilder)
|
||||
|
||||
### String Pool
|
||||
|
||||
字符串常量池(String Pool)保存着所有字符串字面量(literal strings),这些字面量在编译时期就确定。不仅如此,还可以使用 String 的 intern() 方法在运行过程将字符串添加到 String Pool 中。
|
||||
|
||||
当一个字符串调用 intern() 方法时,如果 String Pool 中已经存在一个字符串和该字符串值相等(使用 equals() 方法进行确定),那么就会返回 String Pool 中字符串的引用;否则,就会在 String Pool 中添加一个新的字符串,并返回这个新字符串的引用。
|
||||
|
||||
下面示例中,s1 和 s2 采用 new String() 的方式新建了两个不同字符串,而 s3 和 s4 是通过 s1.intern() 和 s2.intern() 方法取得同一个字符串引用。intern() 首先把 "aaa" 放到 String Pool 中,然后返回这个字符串引用,因此 s3 和 s4 引用的是同一个字符串。
|
||||
|
||||
```java
|
||||
String s1 = new String("aaa");
|
||||
String s2 = new String("aaa");
|
||||
System.out.println(s1 == s2); // false
|
||||
String s3 = s1.intern();
|
||||
String s4 = s2.intern();
|
||||
System.out.println(s3 == s4); // true
|
||||
```
|
||||
|
||||
如果是采用 "bbb" 这种字面量的形式创建字符串,会自动地将字符串放入 String Pool 中。
|
||||
|
||||
```java
|
||||
String s5 = "bbb";
|
||||
String s6 = "bbb";
|
||||
System.out.println(s5 == s6); // true
|
||||
```
|
||||
|
||||
在 Java 7 之前,String Pool 被放在运行时常量池中,它属于永久代。而在 Java 7,String Pool 被移到堆中。这是因为永久代的空间有限,在大量使用字符串的场景下会导致 OutOfMemoryError 错误。
|
||||
|
||||
- [StackOverflow : What is String interning?](https://stackoverflow.com/questions/10578984/what-is-string-interning)
|
||||
- [深入解析 String#intern](https://tech.meituan.com/in_depth_understanding_string_intern.html)
|
||||
|
||||
### new String("abc")
|
||||
|
||||
使用这种方式一共会创建两个字符串对象(前提是 String Pool 中还没有 "abc" 字符串对象)。
|
||||
|
||||
- "abc" 属于字符串字面量,因此编译时期会在 String Pool 中创建一个字符串对象,指向这个 "abc" 字符串字面量;
|
||||
- 而使用 new 的方式会在堆中创建一个字符串对象。
|
||||
|
||||
创建一个测试类,其 main 方法中使用这种方式来创建字符串对象。
|
||||
|
||||
```java
|
||||
public class NewStringTest {
|
||||
public static void main(String[] args) {
|
||||
String s = new String("abc");
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
使用 javap -verbose 进行反编译,得到以下内容:
|
||||
|
||||
```java
|
||||
// ...
|
||||
Constant pool:
|
||||
// ...
|
||||
#2 = Class #18 // java/lang/String
|
||||
#3 = String #19 // abc
|
||||
// ...
|
||||
#18 = Utf8 java/lang/String
|
||||
#19 = Utf8 abc
|
||||
// ...
|
||||
|
||||
public static void main(java.lang.String[]);
|
||||
descriptor: ([Ljava/lang/String;)V
|
||||
flags: ACC_PUBLIC, ACC_STATIC
|
||||
Code:
|
||||
stack=3, locals=2, args_size=1
|
||||
0: new #2 // class java/lang/String
|
||||
3: dup
|
||||
4: ldc #3 // String abc
|
||||
6: invokespecial #4 // Method java/lang/String."<init>":(Ljava/lang/String;)V
|
||||
9: astore_1
|
||||
// ...
|
||||
```
|
||||
|
||||
在 Constant Pool 中,#19 存储这字符串字面量 "abc",#3 是 String Pool 的字符串对象,它指向 #19 这个字符串字面量。在 main 方法中,0: 行使用 new #2 在堆中创建一个字符串对象,并且使用 ldc #3 将 String Pool 中的字符串对象作为 String 构造函数的参数。
|
||||
|
||||
以下是 String 构造函数的源码,可以看到,在将一个字符串对象作为另一个字符串对象的构造函数参数时,并不会完全复制 value 数组内容,而是都会指向同一个 value 数组。
|
||||
|
||||
```java
|
||||
public String(String original) {
|
||||
this.value = original.value;
|
||||
this.hash = original.hash;
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
```java
|
||||
String sa = new String("hello");
|
||||
String sb = new String("hello");
|
||||
System.out.println(sa==sb);
|
||||
//False
|
||||
|
||||
String sc = "hello";
|
||||
String sd = "hello";
|
||||
System.out.println(sc==sd);
|
||||
//True
|
||||
```
|
||||
59
Java基础教程/Java语言基础/20 Scanner.md
Normal file
@@ -0,0 +1,59 @@
|
||||
## Scanner
|
||||
|
||||
```java
|
||||
Scanner s = new Scanner(System.in);
|
||||
|
||||
s.next();
|
||||
s.nextLine();
|
||||
|
||||
s.hasNext();
|
||||
s.hasNextLine();
|
||||
|
||||
//尽量关闭掉
|
||||
s.close();
|
||||
```
|
||||
|
||||
|
||||
```java
|
||||
|
||||
package com.ykl;
|
||||
|
||||
import java.util.Scanner;
|
||||
|
||||
public class ScannerTest {
|
||||
public static void main(String[] args) {
|
||||
Scanner s = new Scanner(System.in);
|
||||
|
||||
System.out.println("使用不同的方式读取数据");
|
||||
|
||||
// // hasNext会一直阻塞,直到由新的内容。
|
||||
// while(s.hasNext()){
|
||||
// System.out.println("读取前的环节");
|
||||
// String str = s.next();
|
||||
// System.out.println("读取到的内容位:"+str);
|
||||
// }
|
||||
//
|
||||
//
|
||||
// // hasNextLine会一直阻塞,直到由新的内容。测试一下next()是否会阻塞
|
||||
// while(s.hasNextLine()){
|
||||
// System.out.println("读取前的环节");
|
||||
// String str = s.nextLine();
|
||||
// System.out.println("读取到的内容位:"+str);
|
||||
// }
|
||||
//
|
||||
|
||||
//hasNextInt方法会阻塞,如果不是整数会返回False
|
||||
if(s.hasNextInt()){
|
||||
System.out.println("读取前的环节");
|
||||
int str = s.nextInt();
|
||||
System.out.println("读取到的内容位:"+str);
|
||||
}
|
||||
else{
|
||||
System.out.println("你输入的不是整数");
|
||||
}
|
||||
|
||||
s.close();
|
||||
}
|
||||
|
||||
}
|
||||
```
|
||||
1
Java基础教程/Java语言基础/Input&Output.md
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
BIN
Java基础教程/Java语言基础/image/2022-07-09-09-40-30.png
Normal file
|
After Width: | Height: | Size: 204 KiB |
BIN
Java基础教程/Java语言基础/image/2022-07-09-10-21-44.png
Normal file
|
After Width: | Height: | Size: 92 KiB |
BIN
Java基础教程/Java语言基础/image/2022-07-10-10-32-18.png
Normal file
|
After Width: | Height: | Size: 70 KiB |
BIN
Java基础教程/Java语言基础/image/2022-07-10-18-27-47.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
Java基础教程/Java语言基础/image/2022-07-10-21-39-34.png
Normal file
|
After Width: | Height: | Size: 83 KiB |
BIN
Java基础教程/Java语言基础/阿里巴巴java开发手册2020.pdf
Normal file
388
Java基础教程/Java面试原理/03 关键字.md
Normal file
@@ -0,0 +1,388 @@
|
||||
<table class="reference">
|
||||
<tbody><tr>
|
||||
<th>类别</th>
|
||||
<th>关键字</th>
|
||||
<th>说明</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="4" align="center">访问控制</td>
|
||||
<td>private</td>
|
||||
<td>私有的</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>protected</td>
|
||||
<td>受保护的</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>public</td>
|
||||
<td>公共的</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>default </td>
|
||||
<td>默认</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="13" align="center">类、方法和变量修饰符</td>
|
||||
<td>abstract</td>
|
||||
<td>声明抽象</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>class</td>
|
||||
<td>类</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>extends</td>
|
||||
<td>扩充,继承</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>final</td>
|
||||
<td>最终值,不可改变的</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>implements</td>
|
||||
<td>实现(接口)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>interface</td>
|
||||
<td>接口</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>native</td>
|
||||
<td>本地,原生方法(非 Java 实现)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>new</td>
|
||||
<td>新,创建</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>static</td>
|
||||
<td>静态</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>strictfp</td>
|
||||
<td>严格,精准</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>synchronized</td>
|
||||
<td>线程,同步</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>transient</td>
|
||||
<td>短暂</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>volatile</td>
|
||||
<td>易失</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="12" align="center">程序控制语句</td>
|
||||
<td>break</td>
|
||||
<td>跳出循环</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>case</td>
|
||||
<td>定义一个值以供 switch 选择</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>continue</td>
|
||||
<td>继续</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>default</td>
|
||||
<td>默认</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>do</td>
|
||||
<td>运行</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>else</td>
|
||||
<td>否则</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>for</td>
|
||||
<td>循环</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>if</td>
|
||||
<td>如果</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>instanceof</td>
|
||||
<td>实例</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>return</td>
|
||||
<td>返回</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>switch</td>
|
||||
<td>根据值选择执行</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>while</td>
|
||||
<td>循环</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="6" align="center">错误处理</td>
|
||||
<td>assert</td>
|
||||
<td>断言表达式是否为真</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>catch</td>
|
||||
<td>捕捉异常</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>finally</td>
|
||||
<td>有没有异常都执行</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>throw</td>
|
||||
<td>抛出一个异常对象</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>throws</td>
|
||||
<td>声明一个异常可能被抛出</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>try</td>
|
||||
<td>捕获异常</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="2" align="center">包相关</td>
|
||||
<td>import</td>
|
||||
<td>引入</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>package</td>
|
||||
<td>包</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="8" align="center">基本类型</td>
|
||||
<td>boolean</td>
|
||||
<td>布尔型</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>byte</td>
|
||||
<td>字节型</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>char</td>
|
||||
<td>字符型</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>double</td>
|
||||
<td>双精度浮点</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>float</td>
|
||||
<td>单精度浮点</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>int</td>
|
||||
<td>整型</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>long</td>
|
||||
<td>长整型</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>short</td>
|
||||
<td>短整型</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td rowspan="3" align="center">变量引用</td>
|
||||
<td>super</td>
|
||||
<td>父类,超类</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>this</td>
|
||||
<td>本类</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>void</td>
|
||||
<td>无返回值</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="3" align="center">保留关键字</td>
|
||||
<td>goto</td>
|
||||
<td>是关键字,但不能使用</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>const</td>
|
||||
<td>是关键字,但不能使用</td>
|
||||
</tr>
|
||||
|
||||
</tbody></table>
|
||||
|
||||
|
||||
### final
|
||||
|
||||
**1. 数据**
|
||||
|
||||
声明数据为常量,可以是编译时常量,也可以是在运行时被初始化后不能被改变的常量。
|
||||
|
||||
- 对于基本类型,final 使数值不变;
|
||||
- 对于引用类型,final 使引用不变,也就不能引用其它对象,但是被引用的对象本身是可以修改的。
|
||||
|
||||
```java
|
||||
final int x = 1;
|
||||
// x = 2; // cannot assign value to final variable 'x'
|
||||
final A y = new A();
|
||||
y.a = 1;
|
||||
```
|
||||
|
||||
**2. 方法**
|
||||
|
||||
声明方法不能被子类重写。
|
||||
|
||||
private 方法隐式地被指定为 final,如果在子类中定义的方法和基类中的一个 private 方法签名相同,此时子类的方法不是重写基类方法,而是在子类中定义了一个新的方法。
|
||||
|
||||
**3. 类**
|
||||
|
||||
声明类不允许被继承。
|
||||
|
||||
### static
|
||||
|
||||
**1. 静态变量**
|
||||
|
||||
- 静态变量:又称为类变量,也就是说这个变量属于类的,类所有的实例都共享静态变量,可以直接通过类名来访问它。静态变量在内存中只存在一份。
|
||||
- 实例变量:每创建一个实例就会产生一个实例变量,它与该实例同生共死。
|
||||
|
||||
```java
|
||||
public class A {
|
||||
|
||||
private int x; // 实例变量
|
||||
private static int y; // 静态变量
|
||||
|
||||
public static void main(String[] args) {
|
||||
// int x = A.x; // Non-static field 'x' cannot be referenced from a static context
|
||||
A a = new A();
|
||||
int x = a.x;
|
||||
int y = A.y;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**2. 静态方法**
|
||||
|
||||
静态方法在类加载的时候就存在了,它不依赖于任何实例。所以静态方法必须有实现,也就是说它不能是抽象方法。
|
||||
|
||||
```java
|
||||
public abstract class A {
|
||||
public static void func1(){
|
||||
}
|
||||
// public abstract static void func2(); // Illegal combination of modifiers: 'abstract' and 'static'
|
||||
}
|
||||
```
|
||||
|
||||
只能访问所属类的静态字段和静态方法,方法中不能有 this 和 super 关键字,因此这两个关键字与具体对象关联。
|
||||
|
||||
```java
|
||||
public class A {
|
||||
|
||||
private static int x;
|
||||
private int y;
|
||||
|
||||
public static void func1(){
|
||||
int a = x;
|
||||
// int b = y; // Non-static field 'y' cannot be referenced from a static context
|
||||
// int b = this.y; // 'A.this' cannot be referenced from a static context
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**3. 静态语句块**
|
||||
|
||||
静态语句块在类初始化时运行一次。
|
||||
|
||||
```java
|
||||
public class A {
|
||||
static {
|
||||
System.out.println("123");
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
A a1 = new A();
|
||||
A a2 = new A();
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
```html
|
||||
123
|
||||
```
|
||||
|
||||
**4. 静态内部类**
|
||||
|
||||
非静态内部类依赖于外部类的实例,也就是说需要先创建外部类实例,才能用这个实例去创建非静态内部类。而静态内部类不需要。
|
||||
|
||||
```java
|
||||
public class OuterClass {
|
||||
|
||||
class InnerClass {
|
||||
}
|
||||
|
||||
static class StaticInnerClass {
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
// InnerClass innerClass = new InnerClass(); // 'OuterClass.this' cannot be referenced from a static context
|
||||
OuterClass outerClass = new OuterClass();
|
||||
InnerClass innerClass = outerClass.new InnerClass();
|
||||
StaticInnerClass staticInnerClass = new StaticInnerClass();
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
静态内部类不能访问外部类的非静态的变量和方法。
|
||||
|
||||
**5. 静态导包**
|
||||
|
||||
在使用静态变量和方法时不用再指明 ClassName,从而简化代码,但可读性大大降低。
|
||||
|
||||
```java
|
||||
import static com.xxx.ClassName.*
|
||||
```
|
||||
|
||||
**6. 初始化顺序**
|
||||
|
||||
静态变量和静态语句块优先于实例变量和普通语句块,静态变量和静态语句块的初始化顺序取决于它们在代码中的顺序。
|
||||
|
||||
```java
|
||||
public static String staticField = "静态变量";
|
||||
```
|
||||
|
||||
```java
|
||||
static {
|
||||
System.out.println("静态语句块");
|
||||
}
|
||||
```
|
||||
|
||||
```java
|
||||
public String field = "实例变量";
|
||||
```
|
||||
|
||||
```java
|
||||
{
|
||||
System.out.println("普通语句块");
|
||||
}
|
||||
```
|
||||
|
||||
最后才是构造函数的初始化。
|
||||
|
||||
```java
|
||||
public InitialOrderTest() {
|
||||
System.out.println("构造函数");
|
||||
}
|
||||
```
|
||||
|
||||
存在继承的情况下,初始化顺序为:
|
||||
|
||||
- 父类(静态变量、静态语句块)
|
||||
- 子类(静态变量、静态语句块)
|
||||
- 父类(实例变量、普通语句块)
|
||||
- 父类(构造函数)
|
||||
- 子类(实例变量、普通语句块)
|
||||
- 子类(构造函数)
|
||||
167
Java基础教程/Java面试原理/04 修饰符.md
Normal file
@@ -0,0 +1,167 @@
|
||||
|
||||
## 0 修饰符概述
|
||||
Java 常见的修饰符
|
||||
|
||||
1. 访问控制修饰符default,private,public,protected
|
||||
2. 非访问控制修饰符static/final/abstract/sychronized/transient/volatile
|
||||
|
||||
## 1 访问控制修饰符
|
||||
|
||||
### 修饰符的作用
|
||||
1. 默认访问修饰符-不使用任何关键字。使用默认访问修饰符声明的变量和方法,对同一个包内的类是可见的。接口里的变量都隐式声明为 public static final,而接口里的方法默认情况下访问权限为 public
|
||||
2. 私有访问修饰符-private。私有访问修饰符是最严格的访问级别,所以被声明为 private 的方法、变量和构造方法只能被所属类访问,并且类和接口不能声明为 private。声明为私有访问类型的变量只能通过类中公共的 getter 方法被外部类访问。private 访问修饰符的使用主要用来隐藏类的实现细节和保护类的数据。
|
||||
3. 公有访问修饰符-public。被声明为 public 的类、方法、构造方法和接口能够被任何其他类访问。如果几个相互访问的 public 类分布在不同的包中,则需要导入相应 public 类所在的包。由于类的继承性,类所有的公有方法和变量都能被其子类继承。
|
||||
4. 受保护的访问修饰符-protected。那么在子类中,子类实例可以访问其从基类继承而来的 protected 方法,而不能访问基类实例的protected方法。
|
||||
|
||||
|
||||
### 修饰符的可见范围
|
||||
|
||||
| 修饰符 | 当前类 | 同一包 | 子孙类 | 其他包 |
|
||||
|-----------|-----|------|----------|-----|
|
||||
| public | Y | Y | Y | Y |
|
||||
| protected | Y | Y | Y/N | N |
|
||||
| default | Y | Y | N | N |
|
||||
| private | Y | N | N | N |
|
||||
|
||||
|
||||
|
||||
### 修饰符的可见范围
|
||||
```
|
||||
public > protected > default > private.
|
||||
public:所有地方可见
|
||||
protected:同一包内+子类可见
|
||||
default:同一包内
|
||||
private:同一类内
|
||||
```
|
||||
|
||||
## 2 非访问控制修饰符
|
||||
|
||||
### static 修饰符
|
||||
|
||||
用来修饰类方法和类变量。
|
||||
* **静态变量** static 关键字用来声明独立于对象的静态变量,无论一个类实例化多少对象,它的静态变量只有一份拷贝。 静态变量也被称为**类变量**。局部变量不能被声明为 static 变量。
|
||||
* **静态方法** static 关键字用来声明独立于对象的静态方法。静态方法不能使用类的非静态变量。静态方法从参数列表得到数据,然后计算这些数据。
|
||||
* 对类变量和方法的访问可以直接使用 classname.variablename 和 classname.methodname 的方式访问。
|
||||
|
||||
```java
|
||||
public class InstanceCounter {
|
||||
private static int numInstances = 0;
|
||||
protected static int getCount() {
|
||||
return numInstances;
|
||||
}
|
||||
|
||||
private static void addInstance() {
|
||||
numInstances++;
|
||||
}
|
||||
|
||||
InstanceCounter() {
|
||||
InstanceCounter.addInstance();
|
||||
}
|
||||
|
||||
public static void main(String[] arguments) {
|
||||
System.out.println("Starting with " +
|
||||
InstanceCounter.getCount() + " instances");
|
||||
for (int i = 0; i < 500; ++i){
|
||||
new InstanceCounter();
|
||||
}
|
||||
System.out.println("Created " +
|
||||
InstanceCounter.getCount() + " instances");
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
### final修饰符
|
||||
用来修饰类、方法和变量,final 修饰的类不能够被继承,修饰的方法不能被继承类重新定义,修饰的变量为常量,是不可修改的。
|
||||
* **final变量** 表示"最后的、最终的"含义,变量一旦赋值后,不能被重新赋值。被 final 修饰的实例变量必须显式指定初始值。final 修饰符通常和 static 修饰符一起使用来创建类常量。
|
||||
* **final方法**可以被子类继承,但是不能被子类重写。声明 final 方法的主要目的是防止该方法的内容被修改。
|
||||
* **final类** final 类不能被继承,没有类能够继承 final 类的任何特性。
|
||||
```java
|
||||
public class Test{
|
||||
final int value = 10;
|
||||
// 下面是声明常量的实例
|
||||
public static final int BOXWIDTH = 6;
|
||||
static final String TITLE = "Manager";
|
||||
|
||||
public void changeValue(){
|
||||
value = 12; //将输出一个错误
|
||||
}
|
||||
}
|
||||
public class Test{
|
||||
public final void changeName(){
|
||||
// 方法体
|
||||
}
|
||||
}
|
||||
|
||||
public final class Test {
|
||||
// 类体
|
||||
}
|
||||
```
|
||||
|
||||
### abstract 修饰符
|
||||
用来创建抽象类和抽象方法。抽象类不能用来实例化对象,声明抽象类的唯一目的是为了将来对该类进行扩充。
|
||||
|
||||
|
||||
* **一个类**不能同时被 abstract 和 final 修饰。如果一个类包含抽象方法,那么该类一定要声明为抽象类,否则将出现编译错误。抽象类可以包含抽象方法和非抽象方法。
|
||||
* **抽象方法**抽象方法是一种没有任何实现的方法,该方法的具体实现由子类提供。抽象方法不能被声明成 final 和 static。
|
||||
* 任何继承抽象类的子类必须实现父类的所有抽象方法,除非该子类也是抽象类。如果一个类包含若干个抽象方法,那么该类必须声明为抽象类。抽象类可以不包含抽象方法。抽象方法的声明以分号结尾,例如:public abstract sample();。
|
||||
```java
|
||||
public abstract class SuperClass{
|
||||
abstract void m(); //抽象方法
|
||||
}
|
||||
|
||||
class SubClass extends SuperClass{
|
||||
//实现抽象方法
|
||||
void m(){
|
||||
.........
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
### synchronized 修饰符
|
||||
|
||||
synchronized 关键字声明的方法同一时间只能被一个线程访问。synchronized 修饰符可以应用于四个访问修饰符。
|
||||
* synchronized 和 volatile 修饰符,主要用于线程的编程。
|
||||
|
||||
|
||||
### transient 修饰符
|
||||
|
||||
序列化的对象包含被 transient 修饰的实例变量时,java 虚拟机(JVM)跳过该特定的变量。
|
||||
|
||||
该修饰符包含在定义变量的语句中,用来预处理类和变量的数据类型。
|
||||
|
||||
```java
|
||||
public transient int limit = 55; // 不会持久化
|
||||
public int b; // 持久化
|
||||
```
|
||||
|
||||
### volatile 修饰符
|
||||
强制内存读写
|
||||
|
||||
volatile 修饰的成员变量在每次被线程访问时,都强制从共享内存中重新读取该成员变量的值。而且,当成员变量发生变化时,会强制线程将变化值回写到共享内存。这样在任何时刻,两个不同的线程总是看到某个成员变量的同一个值。
|
||||
|
||||
一个 volatile 对象引用可能是 null。
|
||||
|
||||
```java
|
||||
public class MyRunnable implements Runnable
|
||||
{
|
||||
private volatile boolean active;
|
||||
public void run()
|
||||
{
|
||||
active = true;
|
||||
while (active) // 第一行
|
||||
{
|
||||
// 代码
|
||||
}
|
||||
}
|
||||
public void stop()
|
||||
{
|
||||
active = false; // 第二行
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
通常情况下,在一个线程调用 run() 方法(在 Runnable 开启的线程),在另一个线程调用 stop() 方法。 如果 第一行 中缓冲区的 active 值被使用,那么在 第二行 的 active 值为 false 时循环不会停止。
|
||||
|
||||
但是以上代码中我们使用了 volatile 修饰 active,所以该循环会停止。
|
||||
20
Java基础教程/Java面试原理/Arrays类.md
Normal file
@@ -0,0 +1,20 @@
|
||||
## Arrays类中的方法
|
||||
|
||||
### 方法概述
|
||||
|
||||
* 给数组赋值:通过 fill 方法。
|
||||
* 对数组排序:通过 sort 方法,按升序。
|
||||
* 比较数组:通过 equals 方法比较数组中元素值是否相等。
|
||||
* 查找数组元素:通过 binarySearch 方法能对排序好的数组进行二分查找法操作。
|
||||
|
||||
|
||||
### 具体方法
|
||||
|
||||
* public static int binarySearch(Object[] a, Object key)
|
||||
用二分查找算法在给定数组中搜索给定值的对象(Byte,Int,double等)。数组在调用前必须排序好的。如果查找值包含在数组中,则返回搜索键的索引;否则返回 (-(插入点) - 1)。
|
||||
* public static boolean equals(long[] a, long[] a2)
|
||||
如果两个指定的 long 型数组彼此相等,则返回 true。如果两个数组包含相同数量的元素,并且两个数组中的所有相应元素对都是相等的,则认为这两个数组是相等的。换句话说,如果两个数组以相同顺序包含相同的元素,则两个数组是相等的。同样的方法适用于所有的其他基本数据类型(Byte,short,Int等)。
|
||||
* public static void fill(int[] a, int val)
|
||||
将指定的 int 值分配给指定 int 型数组指定范围中的每个元素。同样的方法适用于所有的其他基本数据类型(Byte,short,Int等)。
|
||||
* public static void sort(Object[] a)
|
||||
对指定对象数组根据其元素的自然顺序进行升序排列。同样的方法适用于所有的其他基本数据类型(Byte,short,Int等)。
|
||||
@@ -1,3 +0,0 @@
|
||||
java 中有太多的工具了。需要在这里进行整理说明。
|
||||
|
||||
大型的java框架,如Spring,则另起炉灶,小的Spring工具就在这里介绍了。
|
||||
8
Java源代码/Lesson01/Java01HelloWorld.java
Normal file
@@ -0,0 +1,8 @@
|
||||
|
||||
public class Java01HelloWorld {
|
||||
public static void main(String[] args) {
|
||||
System.out.println("Hello");
|
||||
// System.exit(0);
|
||||
|
||||
}
|
||||
}
|
||||
3
Java源代码/Lesson02/.idea/.gitignore
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
15
Java源代码/Lesson02/.idea/misc.xml
generated
Normal file
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="JavadocGenerationManager">
|
||||
<option name="OUTPUT_DIRECTORY" value="$PROJECT_DIR$/.." />
|
||||
<option name="OPTION_SCOPE" value="private" />
|
||||
<option name="OPTION_DOCUMENT_TAG_USE" value="true" />
|
||||
<option name="OPTION_DOCUMENT_TAG_AUTHOR" value="true" />
|
||||
<option name="OPTION_DOCUMENT_TAG_VERSION" value="true" />
|
||||
<option name="OTHER_OPTIONS" value="-encoding utf-8 -charset utf-8" />
|
||||
<option name="LOCALE" value="zh_CN" />
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
</project>
|
||||
9
Java源代码/Lesson02/.idea/modules.xml
generated
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/BasicLanguage/BasicLanguage.iml" filepath="$PROJECT_DIR$/BasicLanguage/BasicLanguage.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/Lesson02.iml" filepath="$PROJECT_DIR$/Lesson02.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
124
Java源代码/Lesson02/.idea/uiDesigner.xml
generated
Normal file
@@ -0,0 +1,124 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Palette2">
|
||||
<group name="Swing">
|
||||
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
|
||||
</item>
|
||||
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.svg" removable="false" auto-create-binding="false" can-attach-label="true">
|
||||
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
|
||||
<initial-values>
|
||||
<property name="text" value="Button" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="RadioButton" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="CheckBox" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="Label" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
|
||||
<preferred-size width="200" height="200" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
|
||||
<preferred-size width="200" height="200" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
|
||||
<preferred-size width="-1" height="20" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
|
||||
</item>
|
||||
</group>
|
||||
</component>
|
||||
</project>
|
||||
6
Java源代码/Lesson02/.idea/vcs.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$/../.." vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
11
Java源代码/Lesson02/BasicLanguage/BasicLanguage.iml
Normal file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="jdk" jdkName="1.8" jdkType="JavaSDK" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
||||
@@ -1,3 +1,4 @@
|
||||
package com.ykl;
|
||||
/**
|
||||
* @author ykl
|
||||
* @since 2022
|
||||
@@ -7,7 +8,6 @@ public class Demo5 {
|
||||
/**
|
||||
*
|
||||
* @param args canshu
|
||||
* @return 123
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
int i = 128;
|
||||
|
||||
@@ -1,2 +1,39 @@
|
||||
package com.ykl;public class Demo6 {
|
||||
package com.ykl;
|
||||
|
||||
|
||||
import java.sql.Array;
|
||||
|
||||
public class Demo6 {
|
||||
public static void main(String[] args) {
|
||||
int [] numbers = {10, 20, 30, 40, 50};
|
||||
max(1.1,2);
|
||||
// for(int x : numbers ) {
|
||||
// if( x == 30 ) {
|
||||
// continue;
|
||||
// }
|
||||
// System.out.print( x );
|
||||
// System.out.print("\n");
|
||||
// }
|
||||
// for (int i = 0; i <= 5; i++) {
|
||||
// for (int j = 0; j < i; j++) {
|
||||
// System.out.print("*");
|
||||
// }
|
||||
// for (int k = 0; k < 5; k++) {
|
||||
//
|
||||
// }
|
||||
// System.out.println();
|
||||
// }
|
||||
Integer a = 10;
|
||||
Array b;
|
||||
}
|
||||
|
||||
public static void max(double a,double b){
|
||||
System.out.println(1);
|
||||
}
|
||||
public static void max(int a,int b){
|
||||
System.out.println(2);
|
||||
}
|
||||
public static void max(int a,int b,int c){
|
||||
System.out.println(3);
|
||||
}
|
||||
}
|
||||
|
||||
14
Java源代码/Lesson02/BasicLanguage/src/com/ykl/HelloWorld.java
Normal file
@@ -0,0 +1,14 @@
|
||||
package com.ykl;
|
||||
|
||||
public class HelloWorld {
|
||||
/*
|
||||
* 多行注释,可以注释一段文字
|
||||
* */
|
||||
public static void main(String[] args) {
|
||||
/**
|
||||
* Java Doc能够识别的注释,两个*号开始
|
||||
*/
|
||||
//单行注释
|
||||
System.out.println("Hello World!");
|
||||
}
|
||||
}
|
||||
@@ -1,2 +1,40 @@
|
||||
package com.ykl.com.ykl;public class ScannerTest {
|
||||
package com.ykl;
|
||||
|
||||
import java.util.Scanner;
|
||||
|
||||
public class ScannerTest {
|
||||
public static void main(String[] args) {
|
||||
Scanner s = new Scanner(System.in);
|
||||
|
||||
System.out.println("使用不同的方式读取数据");
|
||||
|
||||
// // hasNext会一直阻塞,直到由新的内容。
|
||||
// while(s.hasNext()){
|
||||
// System.out.println("读取前的环节");
|
||||
// String str = s.next();
|
||||
// System.out.println("读取到的内容位:"+str);
|
||||
// }
|
||||
//
|
||||
//
|
||||
// // hasNextLine会一直阻塞,直到由新的内容。测试一下next()是否会阻塞
|
||||
// while(s.hasNextLine()){
|
||||
// System.out.println("读取前的环节");
|
||||
// String str = s.nextLine();
|
||||
// System.out.println("读取到的内容位:"+str);
|
||||
// }
|
||||
//
|
||||
|
||||
//hasNextInt方法会阻塞,如果不是整数会返回False
|
||||
if(s.hasNextInt()){
|
||||
System.out.println("读取前的环节");
|
||||
int str = s.nextInt();
|
||||
System.out.println("读取到的内容位:"+str);
|
||||
}
|
||||
else{
|
||||
System.out.println("你输入的不是整数");
|
||||
}
|
||||
|
||||
s.close();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
8
Java源代码/Lesson02/Lesson02.iml
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="GENERAL_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
||||
21
Java源代码/allclasses-frame.html
Normal file
@@ -0,0 +1,21 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!-- NewPage -->
|
||||
<html lang="zh">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_333) on Sun Jul 10 18:03:14 CST 2022 -->
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>所有类</title>
|
||||
<meta name="date" content="2022-07-10">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="script.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1 class="bar">所有类</h1>
|
||||
<div class="indexContainer">
|
||||
<ul>
|
||||
<li><a href="com/ykl/Demo5.html" title="com.ykl中的类" target="classFrame">Demo5</a></li>
|
||||
<li><a href="com/ykl/HelloWorld.html" title="com.ykl中的类" target="classFrame">HelloWorld</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
21
Java源代码/allclasses-noframe.html
Normal file
@@ -0,0 +1,21 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!-- NewPage -->
|
||||
<html lang="zh">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_333) on Sun Jul 10 18:03:14 CST 2022 -->
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>所有类</title>
|
||||
<meta name="date" content="2022-07-10">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="script.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1 class="bar">所有类</h1>
|
||||
<div class="indexContainer">
|
||||
<ul>
|
||||
<li><a href="com/ykl/Demo5.html" title="com.ykl中的类">Demo5</a></li>
|
||||
<li><a href="com/ykl/HelloWorld.html" title="com.ykl中的类">HelloWorld</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
282
Java源代码/com/ykl/Demo5.html
Normal file
@@ -0,0 +1,282 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!-- NewPage -->
|
||||
<html lang="zh">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_333) on Sun Jul 10 18:03:14 CST 2022 -->
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Demo5</title>
|
||||
<meta name="date" content="2022-07-10">
|
||||
<link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../../script.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript"><!--
|
||||
try {
|
||||
if (location.href.indexOf('is-external=true') == -1) {
|
||||
parent.document.title="Demo5";
|
||||
}
|
||||
}
|
||||
catch(err) {
|
||||
}
|
||||
//-->
|
||||
var methods = {"i0":9};
|
||||
var tabs = {65535:["t0","所有方法"],1:["t1","静态方法"],8:["t4","具体方法"]};
|
||||
var altColor = "altColor";
|
||||
var rowColor = "rowColor";
|
||||
var tableTab = "tableTab";
|
||||
var activeTableTab = "activeTableTab";
|
||||
</script>
|
||||
<noscript>
|
||||
<div>您的浏览器已禁用 JavaScript。</div>
|
||||
</noscript>
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="topNav"><a name="navbar.top">
|
||||
<!-- -->
|
||||
</a>
|
||||
<div class="skipNav"><a href="#skip.navbar.top" title="跳过导航链接">跳过导航链接</a></div>
|
||||
<a name="navbar.top.firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="导航">
|
||||
<li><a href="../../com/ykl/package-summary.html">程序包</a></li>
|
||||
<li class="navBarCell1Rev">类</li>
|
||||
<li><a href="class-use/Demo5.html">使用</a></li>
|
||||
<li><a href="package-tree.html">树</a></li>
|
||||
<li><a href="../../deprecated-list.html">已过时</a></li>
|
||||
<li><a href="../../index-files/index-1.html">索引</a></li>
|
||||
<li><a href="../../help-doc.html">帮助</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li>上一个类</li>
|
||||
<li><a href="../../com/ykl/HelloWorld.html" title="com.ykl中的类"><span class="typeNameLink">下一个类</span></a></li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="../../index.html?com/ykl/Demo5.html" target="_top">框架</a></li>
|
||||
<li><a href="Demo5.html" target="_top">无框架</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_top">
|
||||
<li><a href="../../allclasses-noframe.html">所有类</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_top");
|
||||
if(window==top) {
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</div>
|
||||
<div>
|
||||
<ul class="subNavList">
|
||||
<li>概要: </li>
|
||||
<li>嵌套 | </li>
|
||||
<li>字段 | </li>
|
||||
<li><a href="#constructor.summary">构造器</a> | </li>
|
||||
<li><a href="#method.summary">方法</a></li>
|
||||
</ul>
|
||||
<ul class="subNavList">
|
||||
<li>详细资料: </li>
|
||||
<li>字段 | </li>
|
||||
<li><a href="#constructor.detail">构造器</a> | </li>
|
||||
<li><a href="#method.detail">方法</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<a name="skip.navbar.top">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<!-- ======== START OF CLASS DATA ======== -->
|
||||
<div class="header">
|
||||
<div class="subTitle">com.ykl</div>
|
||||
<h2 title="类 Demo5" class="title">类 Demo5</h2>
|
||||
</div>
|
||||
<div class="contentContainer">
|
||||
<ul class="inheritance">
|
||||
<li>java.lang.Object</li>
|
||||
<li>
|
||||
<ul class="inheritance">
|
||||
<li>com.ykl.Demo5</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="description">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<hr>
|
||||
<br>
|
||||
<pre>public class <span class="typeNameLabel">Demo5</span>
|
||||
extends java.lang.Object</pre>
|
||||
<dl>
|
||||
<dt><span class="simpleTagLabel">从以下版本开始:</span></dt>
|
||||
<dd>2022</dd>
|
||||
<dt><span class="simpleTagLabel">版本:</span></dt>
|
||||
<dd>1.0</dd>
|
||||
<dt><span class="simpleTagLabel">作者:</span></dt>
|
||||
<dd>ykl</dd>
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="summary">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="constructor.summary">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>构造器概要</h3>
|
||||
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="构造器概要表, 列表构造器和解释">
|
||||
<caption><span>构造器</span><span class="tabEnd"> </span></caption>
|
||||
<tr>
|
||||
<th class="colOne" scope="col">构造器和说明</th>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colOne"><code><span class="memberNameLink"><a href="../../com/ykl/Demo5.html#Demo5--">Demo5</a></span>()</code> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- ========== METHOD SUMMARY =========== -->
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="method.summary">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>方法概要</h3>
|
||||
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="方法概要表, 列表方法和解释">
|
||||
<caption><span id="t0" class="activeTableTab"><span>所有方法</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">静态方法</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">具体方法</a></span><span class="tabEnd"> </span></span></caption>
|
||||
<tr>
|
||||
<th class="colFirst" scope="col">限定符和类型</th>
|
||||
<th class="colLast" scope="col">方法和说明</th>
|
||||
</tr>
|
||||
<tr id="i0" class="altColor">
|
||||
<td class="colFirst"><code>static void</code></td>
|
||||
<td class="colLast"><code><span class="memberNameLink"><a href="../../com/ykl/Demo5.html#main-java.lang.String:A-">main</a></span>(java.lang.String[] args)</code> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>从类继承的方法 java.lang.Object</h3>
|
||||
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="details">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<!-- ========= CONSTRUCTOR DETAIL ======== -->
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="constructor.detail">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>构造器详细资料</h3>
|
||||
<a name="Demo5--">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>Demo5</h4>
|
||||
<pre>public Demo5()</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- ============ METHOD DETAIL ========== -->
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="method.detail">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>方法详细资料</h3>
|
||||
<a name="main-java.lang.String:A-">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>main</h4>
|
||||
<pre>public static void main(java.lang.String[] args)</pre>
|
||||
<dl>
|
||||
<dt><span class="paramLabel">参数:</span></dt>
|
||||
<dd><code>args</code> - canshu</dd>
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- ========= END OF CLASS DATA ========= -->
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<div class="bottomNav"><a name="navbar.bottom">
|
||||
<!-- -->
|
||||
</a>
|
||||
<div class="skipNav"><a href="#skip.navbar.bottom" title="跳过导航链接">跳过导航链接</a></div>
|
||||
<a name="navbar.bottom.firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="导航">
|
||||
<li><a href="../../com/ykl/package-summary.html">程序包</a></li>
|
||||
<li class="navBarCell1Rev">类</li>
|
||||
<li><a href="class-use/Demo5.html">使用</a></li>
|
||||
<li><a href="package-tree.html">树</a></li>
|
||||
<li><a href="../../deprecated-list.html">已过时</a></li>
|
||||
<li><a href="../../index-files/index-1.html">索引</a></li>
|
||||
<li><a href="../../help-doc.html">帮助</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li>上一个类</li>
|
||||
<li><a href="../../com/ykl/HelloWorld.html" title="com.ykl中的类"><span class="typeNameLink">下一个类</span></a></li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="../../index.html?com/ykl/Demo5.html" target="_top">框架</a></li>
|
||||
<li><a href="Demo5.html" target="_top">无框架</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_bottom">
|
||||
<li><a href="../../allclasses-noframe.html">所有类</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
||||
if(window==top) {
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</div>
|
||||
<div>
|
||||
<ul class="subNavList">
|
||||
<li>概要: </li>
|
||||
<li>嵌套 | </li>
|
||||
<li>字段 | </li>
|
||||
<li><a href="#constructor.summary">构造器</a> | </li>
|
||||
<li><a href="#method.summary">方法</a></li>
|
||||
</ul>
|
||||
<ul class="subNavList">
|
||||
<li>详细资料: </li>
|
||||
<li>字段 | </li>
|
||||
<li><a href="#constructor.detail">构造器</a> | </li>
|
||||
<li><a href="#method.detail">方法</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<a name="skip.navbar.bottom">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
</body>
|
||||
</html>
|
||||
270
Java源代码/com/ykl/HelloWorld.html
Normal file
@@ -0,0 +1,270 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!-- NewPage -->
|
||||
<html lang="zh">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_333) on Sun Jul 10 18:03:14 CST 2022 -->
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>HelloWorld</title>
|
||||
<meta name="date" content="2022-07-10">
|
||||
<link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../../script.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript"><!--
|
||||
try {
|
||||
if (location.href.indexOf('is-external=true') == -1) {
|
||||
parent.document.title="HelloWorld";
|
||||
}
|
||||
}
|
||||
catch(err) {
|
||||
}
|
||||
//-->
|
||||
var methods = {"i0":9};
|
||||
var tabs = {65535:["t0","所有方法"],1:["t1","静态方法"],8:["t4","具体方法"]};
|
||||
var altColor = "altColor";
|
||||
var rowColor = "rowColor";
|
||||
var tableTab = "tableTab";
|
||||
var activeTableTab = "activeTableTab";
|
||||
</script>
|
||||
<noscript>
|
||||
<div>您的浏览器已禁用 JavaScript。</div>
|
||||
</noscript>
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="topNav"><a name="navbar.top">
|
||||
<!-- -->
|
||||
</a>
|
||||
<div class="skipNav"><a href="#skip.navbar.top" title="跳过导航链接">跳过导航链接</a></div>
|
||||
<a name="navbar.top.firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="导航">
|
||||
<li><a href="../../com/ykl/package-summary.html">程序包</a></li>
|
||||
<li class="navBarCell1Rev">类</li>
|
||||
<li><a href="class-use/HelloWorld.html">使用</a></li>
|
||||
<li><a href="package-tree.html">树</a></li>
|
||||
<li><a href="../../deprecated-list.html">已过时</a></li>
|
||||
<li><a href="../../index-files/index-1.html">索引</a></li>
|
||||
<li><a href="../../help-doc.html">帮助</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li><a href="../../com/ykl/Demo5.html" title="com.ykl中的类"><span class="typeNameLink">上一个类</span></a></li>
|
||||
<li>下一个类</li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="../../index.html?com/ykl/HelloWorld.html" target="_top">框架</a></li>
|
||||
<li><a href="HelloWorld.html" target="_top">无框架</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_top">
|
||||
<li><a href="../../allclasses-noframe.html">所有类</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_top");
|
||||
if(window==top) {
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</div>
|
||||
<div>
|
||||
<ul class="subNavList">
|
||||
<li>概要: </li>
|
||||
<li>嵌套 | </li>
|
||||
<li>字段 | </li>
|
||||
<li><a href="#constructor.summary">构造器</a> | </li>
|
||||
<li><a href="#method.summary">方法</a></li>
|
||||
</ul>
|
||||
<ul class="subNavList">
|
||||
<li>详细资料: </li>
|
||||
<li>字段 | </li>
|
||||
<li><a href="#constructor.detail">构造器</a> | </li>
|
||||
<li><a href="#method.detail">方法</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<a name="skip.navbar.top">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<!-- ======== START OF CLASS DATA ======== -->
|
||||
<div class="header">
|
||||
<div class="subTitle">com.ykl</div>
|
||||
<h2 title="类 HelloWorld" class="title">类 HelloWorld</h2>
|
||||
</div>
|
||||
<div class="contentContainer">
|
||||
<ul class="inheritance">
|
||||
<li>java.lang.Object</li>
|
||||
<li>
|
||||
<ul class="inheritance">
|
||||
<li>com.ykl.HelloWorld</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="description">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<hr>
|
||||
<br>
|
||||
<pre>public class <span class="typeNameLabel">HelloWorld</span>
|
||||
extends java.lang.Object</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="summary">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="constructor.summary">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>构造器概要</h3>
|
||||
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="构造器概要表, 列表构造器和解释">
|
||||
<caption><span>构造器</span><span class="tabEnd"> </span></caption>
|
||||
<tr>
|
||||
<th class="colOne" scope="col">构造器和说明</th>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colOne"><code><span class="memberNameLink"><a href="../../com/ykl/HelloWorld.html#HelloWorld--">HelloWorld</a></span>()</code> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- ========== METHOD SUMMARY =========== -->
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="method.summary">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>方法概要</h3>
|
||||
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="方法概要表, 列表方法和解释">
|
||||
<caption><span id="t0" class="activeTableTab"><span>所有方法</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">静态方法</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">具体方法</a></span><span class="tabEnd"> </span></span></caption>
|
||||
<tr>
|
||||
<th class="colFirst" scope="col">限定符和类型</th>
|
||||
<th class="colLast" scope="col">方法和说明</th>
|
||||
</tr>
|
||||
<tr id="i0" class="altColor">
|
||||
<td class="colFirst"><code>static void</code></td>
|
||||
<td class="colLast"><code><span class="memberNameLink"><a href="../../com/ykl/HelloWorld.html#main-java.lang.String:A-">main</a></span>(java.lang.String[] args)</code> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>从类继承的方法 java.lang.Object</h3>
|
||||
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="details">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<!-- ========= CONSTRUCTOR DETAIL ======== -->
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="constructor.detail">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>构造器详细资料</h3>
|
||||
<a name="HelloWorld--">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>HelloWorld</h4>
|
||||
<pre>public HelloWorld()</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- ============ METHOD DETAIL ========== -->
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="method.detail">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>方法详细资料</h3>
|
||||
<a name="main-java.lang.String:A-">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>main</h4>
|
||||
<pre>public static void main(java.lang.String[] args)</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- ========= END OF CLASS DATA ========= -->
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<div class="bottomNav"><a name="navbar.bottom">
|
||||
<!-- -->
|
||||
</a>
|
||||
<div class="skipNav"><a href="#skip.navbar.bottom" title="跳过导航链接">跳过导航链接</a></div>
|
||||
<a name="navbar.bottom.firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="导航">
|
||||
<li><a href="../../com/ykl/package-summary.html">程序包</a></li>
|
||||
<li class="navBarCell1Rev">类</li>
|
||||
<li><a href="class-use/HelloWorld.html">使用</a></li>
|
||||
<li><a href="package-tree.html">树</a></li>
|
||||
<li><a href="../../deprecated-list.html">已过时</a></li>
|
||||
<li><a href="../../index-files/index-1.html">索引</a></li>
|
||||
<li><a href="../../help-doc.html">帮助</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li><a href="../../com/ykl/Demo5.html" title="com.ykl中的类"><span class="typeNameLink">上一个类</span></a></li>
|
||||
<li>下一个类</li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="../../index.html?com/ykl/HelloWorld.html" target="_top">框架</a></li>
|
||||
<li><a href="HelloWorld.html" target="_top">无框架</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_bottom">
|
||||
<li><a href="../../allclasses-noframe.html">所有类</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
||||
if(window==top) {
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</div>
|
||||
<div>
|
||||
<ul class="subNavList">
|
||||
<li>概要: </li>
|
||||
<li>嵌套 | </li>
|
||||
<li>字段 | </li>
|
||||
<li><a href="#constructor.summary">构造器</a> | </li>
|
||||
<li><a href="#method.summary">方法</a></li>
|
||||
</ul>
|
||||
<ul class="subNavList">
|
||||
<li>详细资料: </li>
|
||||
<li>字段 | </li>
|
||||
<li><a href="#constructor.detail">构造器</a> | </li>
|
||||
<li><a href="#method.detail">方法</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<a name="skip.navbar.bottom">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
</body>
|
||||
</html>
|
||||
123
Java源代码/com/ykl/class-use/Demo5.html
Normal file
@@ -0,0 +1,123 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!-- NewPage -->
|
||||
<html lang="zh">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_333) on Sun Jul 10 18:03:14 CST 2022 -->
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>类 com.ykl.Demo5的使用</title>
|
||||
<meta name="date" content="2022-07-10">
|
||||
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../../../script.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript"><!--
|
||||
try {
|
||||
if (location.href.indexOf('is-external=true') == -1) {
|
||||
parent.document.title="\u7C7B com.ykl.Demo5\u7684\u4F7F\u7528";
|
||||
}
|
||||
}
|
||||
catch(err) {
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
<noscript>
|
||||
<div>您的浏览器已禁用 JavaScript。</div>
|
||||
</noscript>
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="topNav"><a name="navbar.top">
|
||||
<!-- -->
|
||||
</a>
|
||||
<div class="skipNav"><a href="#skip.navbar.top" title="跳过导航链接">跳过导航链接</a></div>
|
||||
<a name="navbar.top.firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="导航">
|
||||
<li><a href="../../../com/ykl/package-summary.html">程序包</a></li>
|
||||
<li><a href="../../../com/ykl/Demo5.html" title="com.ykl中的类">类</a></li>
|
||||
<li class="navBarCell1Rev">使用</li>
|
||||
<li><a href="../../../overview-tree.html">树</a></li>
|
||||
<li><a href="../../../deprecated-list.html">已过时</a></li>
|
||||
<li><a href="../../../index-files/index-1.html">索引</a></li>
|
||||
<li><a href="../../../help-doc.html">帮助</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li>上一个</li>
|
||||
<li>下一个</li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="../../../index.html?com/ykl/class-use/Demo5.html" target="_top">框架</a></li>
|
||||
<li><a href="Demo5.html" target="_top">无框架</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_top">
|
||||
<li><a href="../../../allclasses-noframe.html">所有类</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_top");
|
||||
if(window==top) {
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</div>
|
||||
<a name="skip.navbar.top">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<div class="header">
|
||||
<h2 title="类的使用 com.ykl.Demo5" class="title">类的使用<br>com.ykl.Demo5</h2>
|
||||
</div>
|
||||
<div class="classUseContainer">没有com.ykl.Demo5的用法</div>
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<div class="bottomNav"><a name="navbar.bottom">
|
||||
<!-- -->
|
||||
</a>
|
||||
<div class="skipNav"><a href="#skip.navbar.bottom" title="跳过导航链接">跳过导航链接</a></div>
|
||||
<a name="navbar.bottom.firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="导航">
|
||||
<li><a href="../../../com/ykl/package-summary.html">程序包</a></li>
|
||||
<li><a href="../../../com/ykl/Demo5.html" title="com.ykl中的类">类</a></li>
|
||||
<li class="navBarCell1Rev">使用</li>
|
||||
<li><a href="../../../overview-tree.html">树</a></li>
|
||||
<li><a href="../../../deprecated-list.html">已过时</a></li>
|
||||
<li><a href="../../../index-files/index-1.html">索引</a></li>
|
||||
<li><a href="../../../help-doc.html">帮助</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li>上一个</li>
|
||||
<li>下一个</li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="../../../index.html?com/ykl/class-use/Demo5.html" target="_top">框架</a></li>
|
||||
<li><a href="Demo5.html" target="_top">无框架</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_bottom">
|
||||
<li><a href="../../../allclasses-noframe.html">所有类</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
||||
if(window==top) {
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</div>
|
||||
<a name="skip.navbar.bottom">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
</body>
|
||||
</html>
|
||||
123
Java源代码/com/ykl/class-use/HelloWorld.html
Normal file
@@ -0,0 +1,123 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!-- NewPage -->
|
||||
<html lang="zh">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_333) on Sun Jul 10 18:03:14 CST 2022 -->
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>类 com.ykl.HelloWorld的使用</title>
|
||||
<meta name="date" content="2022-07-10">
|
||||
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../../../script.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript"><!--
|
||||
try {
|
||||
if (location.href.indexOf('is-external=true') == -1) {
|
||||
parent.document.title="\u7C7B com.ykl.HelloWorld\u7684\u4F7F\u7528";
|
||||
}
|
||||
}
|
||||
catch(err) {
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
<noscript>
|
||||
<div>您的浏览器已禁用 JavaScript。</div>
|
||||
</noscript>
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="topNav"><a name="navbar.top">
|
||||
<!-- -->
|
||||
</a>
|
||||
<div class="skipNav"><a href="#skip.navbar.top" title="跳过导航链接">跳过导航链接</a></div>
|
||||
<a name="navbar.top.firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="导航">
|
||||
<li><a href="../../../com/ykl/package-summary.html">程序包</a></li>
|
||||
<li><a href="../../../com/ykl/HelloWorld.html" title="com.ykl中的类">类</a></li>
|
||||
<li class="navBarCell1Rev">使用</li>
|
||||
<li><a href="../../../overview-tree.html">树</a></li>
|
||||
<li><a href="../../../deprecated-list.html">已过时</a></li>
|
||||
<li><a href="../../../index-files/index-1.html">索引</a></li>
|
||||
<li><a href="../../../help-doc.html">帮助</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li>上一个</li>
|
||||
<li>下一个</li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="../../../index.html?com/ykl/class-use/HelloWorld.html" target="_top">框架</a></li>
|
||||
<li><a href="HelloWorld.html" target="_top">无框架</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_top">
|
||||
<li><a href="../../../allclasses-noframe.html">所有类</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_top");
|
||||
if(window==top) {
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</div>
|
||||
<a name="skip.navbar.top">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<div class="header">
|
||||
<h2 title="类的使用 com.ykl.HelloWorld" class="title">类的使用<br>com.ykl.HelloWorld</h2>
|
||||
</div>
|
||||
<div class="classUseContainer">没有com.ykl.HelloWorld的用法</div>
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<div class="bottomNav"><a name="navbar.bottom">
|
||||
<!-- -->
|
||||
</a>
|
||||
<div class="skipNav"><a href="#skip.navbar.bottom" title="跳过导航链接">跳过导航链接</a></div>
|
||||
<a name="navbar.bottom.firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="导航">
|
||||
<li><a href="../../../com/ykl/package-summary.html">程序包</a></li>
|
||||
<li><a href="../../../com/ykl/HelloWorld.html" title="com.ykl中的类">类</a></li>
|
||||
<li class="navBarCell1Rev">使用</li>
|
||||
<li><a href="../../../overview-tree.html">树</a></li>
|
||||
<li><a href="../../../deprecated-list.html">已过时</a></li>
|
||||
<li><a href="../../../index-files/index-1.html">索引</a></li>
|
||||
<li><a href="../../../help-doc.html">帮助</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li>上一个</li>
|
||||
<li>下一个</li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="../../../index.html?com/ykl/class-use/HelloWorld.html" target="_top">框架</a></li>
|
||||
<li><a href="HelloWorld.html" target="_top">无框架</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_bottom">
|
||||
<li><a href="../../../allclasses-noframe.html">所有类</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
||||
if(window==top) {
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</div>
|
||||
<a name="skip.navbar.bottom">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
</body>
|
||||
</html>
|
||||
22
Java源代码/com/ykl/package-frame.html
Normal file
@@ -0,0 +1,22 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!-- NewPage -->
|
||||
<html lang="zh">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_333) on Sun Jul 10 18:03:14 CST 2022 -->
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>com.ykl</title>
|
||||
<meta name="date" content="2022-07-10">
|
||||
<link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../../script.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1 class="bar"><a href="../../com/ykl/package-summary.html" target="classFrame">com.ykl</a></h1>
|
||||
<div class="indexContainer">
|
||||
<h2 title="类">类</h2>
|
||||
<ul title="类">
|
||||
<li><a href="Demo5.html" title="com.ykl中的类" target="classFrame">Demo5</a></li>
|
||||
<li><a href="HelloWorld.html" title="com.ykl中的类" target="classFrame">HelloWorld</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
145
Java源代码/com/ykl/package-summary.html
Normal file
@@ -0,0 +1,145 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!-- NewPage -->
|
||||
<html lang="zh">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_333) on Sun Jul 10 18:03:14 CST 2022 -->
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>com.ykl</title>
|
||||
<meta name="date" content="2022-07-10">
|
||||
<link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../../script.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript"><!--
|
||||
try {
|
||||
if (location.href.indexOf('is-external=true') == -1) {
|
||||
parent.document.title="com.ykl";
|
||||
}
|
||||
}
|
||||
catch(err) {
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
<noscript>
|
||||
<div>您的浏览器已禁用 JavaScript。</div>
|
||||
</noscript>
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="topNav"><a name="navbar.top">
|
||||
<!-- -->
|
||||
</a>
|
||||
<div class="skipNav"><a href="#skip.navbar.top" title="跳过导航链接">跳过导航链接</a></div>
|
||||
<a name="navbar.top.firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="导航">
|
||||
<li><a href="../../com/ykl/package-summary.html">程序包</a></li>
|
||||
<li>类</li>
|
||||
<li><a href="package-use.html">使用</a></li>
|
||||
<li><a href="package-tree.html">树</a></li>
|
||||
<li><a href="../../deprecated-list.html">已过时</a></li>
|
||||
<li><a href="../../index-files/index-1.html">索引</a></li>
|
||||
<li><a href="../../help-doc.html">帮助</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li>上一个程序包</li>
|
||||
<li>下一个程序包</li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="../../index.html?com/ykl/package-summary.html" target="_top">框架</a></li>
|
||||
<li><a href="package-summary.html" target="_top">无框架</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_top">
|
||||
<li><a href="../../allclasses-noframe.html">所有类</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_top");
|
||||
if(window==top) {
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</div>
|
||||
<a name="skip.navbar.top">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<div class="header">
|
||||
<h1 title="程序包" class="title">程序包 com.ykl</h1>
|
||||
</div>
|
||||
<div class="contentContainer">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<table class="typeSummary" border="0" cellpadding="3" cellspacing="0" summary="类概要表, 列表类和解释">
|
||||
<caption><span>类概要</span><span class="tabEnd"> </span></caption>
|
||||
<tr>
|
||||
<th class="colFirst" scope="col">类</th>
|
||||
<th class="colLast" scope="col">说明</th>
|
||||
</tr>
|
||||
<tbody>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><a href="../../com/ykl/Demo5.html" title="com.ykl中的类">Demo5</a></td>
|
||||
<td class="colLast"> </td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><a href="../../com/ykl/HelloWorld.html" title="com.ykl中的类">HelloWorld</a></td>
|
||||
<td class="colLast"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<div class="bottomNav"><a name="navbar.bottom">
|
||||
<!-- -->
|
||||
</a>
|
||||
<div class="skipNav"><a href="#skip.navbar.bottom" title="跳过导航链接">跳过导航链接</a></div>
|
||||
<a name="navbar.bottom.firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="导航">
|
||||
<li><a href="../../com/ykl/package-summary.html">程序包</a></li>
|
||||
<li>类</li>
|
||||
<li><a href="package-use.html">使用</a></li>
|
||||
<li><a href="package-tree.html">树</a></li>
|
||||
<li><a href="../../deprecated-list.html">已过时</a></li>
|
||||
<li><a href="../../index-files/index-1.html">索引</a></li>
|
||||
<li><a href="../../help-doc.html">帮助</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li>上一个程序包</li>
|
||||
<li>下一个程序包</li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="../../index.html?com/ykl/package-summary.html" target="_top">框架</a></li>
|
||||
<li><a href="package-summary.html" target="_top">无框架</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_bottom">
|
||||
<li><a href="../../allclasses-noframe.html">所有类</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
||||
if(window==top) {
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</div>
|
||||
<a name="skip.navbar.bottom">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
</body>
|
||||
</html>
|
||||
133
Java源代码/com/ykl/package-tree.html
Normal file
@@ -0,0 +1,133 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!-- NewPage -->
|
||||
<html lang="zh">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_333) on Sun Jul 10 18:03:14 CST 2022 -->
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>com.ykl 类分层结构</title>
|
||||
<meta name="date" content="2022-07-10">
|
||||
<link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../../script.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript"><!--
|
||||
try {
|
||||
if (location.href.indexOf('is-external=true') == -1) {
|
||||
parent.document.title="com.ykl \u7C7B\u5206\u5C42\u7ED3\u6784";
|
||||
}
|
||||
}
|
||||
catch(err) {
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
<noscript>
|
||||
<div>您的浏览器已禁用 JavaScript。</div>
|
||||
</noscript>
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="topNav"><a name="navbar.top">
|
||||
<!-- -->
|
||||
</a>
|
||||
<div class="skipNav"><a href="#skip.navbar.top" title="跳过导航链接">跳过导航链接</a></div>
|
||||
<a name="navbar.top.firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="导航">
|
||||
<li><a href="../../com/ykl/package-summary.html">程序包</a></li>
|
||||
<li>类</li>
|
||||
<li>使用</li>
|
||||
<li class="navBarCell1Rev">树</li>
|
||||
<li><a href="../../deprecated-list.html">已过时</a></li>
|
||||
<li><a href="../../index-files/index-1.html">索引</a></li>
|
||||
<li><a href="../../help-doc.html">帮助</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li>上一个</li>
|
||||
<li>下一个</li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="../../index.html?com/ykl/package-tree.html" target="_top">框架</a></li>
|
||||
<li><a href="package-tree.html" target="_top">无框架</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_top">
|
||||
<li><a href="../../allclasses-noframe.html">所有类</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_top");
|
||||
if(window==top) {
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</div>
|
||||
<a name="skip.navbar.top">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<div class="header">
|
||||
<h1 class="title">程序包com.ykl的分层结构</h1>
|
||||
</div>
|
||||
<div class="contentContainer">
|
||||
<h2 title="类分层结构">类分层结构</h2>
|
||||
<ul>
|
||||
<li type="circle">java.lang.Object
|
||||
<ul>
|
||||
<li type="circle">com.ykl.<a href="../../com/ykl/Demo5.html" title="com.ykl中的类"><span class="typeNameLink">Demo5</span></a></li>
|
||||
<li type="circle">com.ykl.<a href="../../com/ykl/HelloWorld.html" title="com.ykl中的类"><span class="typeNameLink">HelloWorld</span></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<div class="bottomNav"><a name="navbar.bottom">
|
||||
<!-- -->
|
||||
</a>
|
||||
<div class="skipNav"><a href="#skip.navbar.bottom" title="跳过导航链接">跳过导航链接</a></div>
|
||||
<a name="navbar.bottom.firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="导航">
|
||||
<li><a href="../../com/ykl/package-summary.html">程序包</a></li>
|
||||
<li>类</li>
|
||||
<li>使用</li>
|
||||
<li class="navBarCell1Rev">树</li>
|
||||
<li><a href="../../deprecated-list.html">已过时</a></li>
|
||||
<li><a href="../../index-files/index-1.html">索引</a></li>
|
||||
<li><a href="../../help-doc.html">帮助</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li>上一个</li>
|
||||
<li>下一个</li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="../../index.html?com/ykl/package-tree.html" target="_top">框架</a></li>
|
||||
<li><a href="package-tree.html" target="_top">无框架</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_bottom">
|
||||
<li><a href="../../allclasses-noframe.html">所有类</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
||||
if(window==top) {
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</div>
|
||||
<a name="skip.navbar.bottom">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
</body>
|
||||
</html>
|
||||
123
Java源代码/com/ykl/package-use.html
Normal file
@@ -0,0 +1,123 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!-- NewPage -->
|
||||
<html lang="zh">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_333) on Sun Jul 10 18:03:14 CST 2022 -->
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>程序包 com.ykl的使用</title>
|
||||
<meta name="date" content="2022-07-10">
|
||||
<link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../../script.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript"><!--
|
||||
try {
|
||||
if (location.href.indexOf('is-external=true') == -1) {
|
||||
parent.document.title="\u7A0B\u5E8F\u5305 com.ykl\u7684\u4F7F\u7528";
|
||||
}
|
||||
}
|
||||
catch(err) {
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
<noscript>
|
||||
<div>您的浏览器已禁用 JavaScript。</div>
|
||||
</noscript>
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="topNav"><a name="navbar.top">
|
||||
<!-- -->
|
||||
</a>
|
||||
<div class="skipNav"><a href="#skip.navbar.top" title="跳过导航链接">跳过导航链接</a></div>
|
||||
<a name="navbar.top.firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="导航">
|
||||
<li><a href="../../com/ykl/package-summary.html">程序包</a></li>
|
||||
<li>类</li>
|
||||
<li class="navBarCell1Rev">使用</li>
|
||||
<li><a href="package-tree.html">树</a></li>
|
||||
<li><a href="../../deprecated-list.html">已过时</a></li>
|
||||
<li><a href="../../index-files/index-1.html">索引</a></li>
|
||||
<li><a href="../../help-doc.html">帮助</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li>上一个</li>
|
||||
<li>下一个</li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="../../index.html?com/ykl/package-use.html" target="_top">框架</a></li>
|
||||
<li><a href="package-use.html" target="_top">无框架</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_top">
|
||||
<li><a href="../../allclasses-noframe.html">所有类</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_top");
|
||||
if(window==top) {
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</div>
|
||||
<a name="skip.navbar.top">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<div class="header">
|
||||
<h1 title="程序包的使用 com.ykl" class="title">程序包的使用<br>com.ykl</h1>
|
||||
</div>
|
||||
<div class="contentContainer">没有com.ykl的用法</div>
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<div class="bottomNav"><a name="navbar.bottom">
|
||||
<!-- -->
|
||||
</a>
|
||||
<div class="skipNav"><a href="#skip.navbar.bottom" title="跳过导航链接">跳过导航链接</a></div>
|
||||
<a name="navbar.bottom.firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="导航">
|
||||
<li><a href="../../com/ykl/package-summary.html">程序包</a></li>
|
||||
<li>类</li>
|
||||
<li class="navBarCell1Rev">使用</li>
|
||||
<li><a href="package-tree.html">树</a></li>
|
||||
<li><a href="../../deprecated-list.html">已过时</a></li>
|
||||
<li><a href="../../index-files/index-1.html">索引</a></li>
|
||||
<li><a href="../../help-doc.html">帮助</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li>上一个</li>
|
||||
<li>下一个</li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="../../index.html?com/ykl/package-use.html" target="_top">框架</a></li>
|
||||
<li><a href="package-use.html" target="_top">无框架</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_bottom">
|
||||
<li><a href="../../allclasses-noframe.html">所有类</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
||||
if(window==top) {
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</div>
|
||||
<a name="skip.navbar.bottom">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
</body>
|
||||
</html>
|
||||
123
Java源代码/constant-values.html
Normal file
@@ -0,0 +1,123 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!-- NewPage -->
|
||||
<html lang="zh">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_333) on Sun Jul 10 18:03:14 CST 2022 -->
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>常量字段值</title>
|
||||
<meta name="date" content="2022-07-10">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="script.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript"><!--
|
||||
try {
|
||||
if (location.href.indexOf('is-external=true') == -1) {
|
||||
parent.document.title="\u5E38\u91CF\u5B57\u6BB5\u503C";
|
||||
}
|
||||
}
|
||||
catch(err) {
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
<noscript>
|
||||
<div>您的浏览器已禁用 JavaScript。</div>
|
||||
</noscript>
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="topNav"><a name="navbar.top">
|
||||
<!-- -->
|
||||
</a>
|
||||
<div class="skipNav"><a href="#skip.navbar.top" title="跳过导航链接">跳过导航链接</a></div>
|
||||
<a name="navbar.top.firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="导航">
|
||||
<li><a href="com/ykl/package-summary.html">程序包</a></li>
|
||||
<li>类</li>
|
||||
<li>使用</li>
|
||||
<li><a href="overview-tree.html">树</a></li>
|
||||
<li><a href="deprecated-list.html">已过时</a></li>
|
||||
<li><a href="index-files/index-1.html">索引</a></li>
|
||||
<li><a href="help-doc.html">帮助</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li>上一个</li>
|
||||
<li>下一个</li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="index.html?constant-values.html" target="_top">框架</a></li>
|
||||
<li><a href="constant-values.html" target="_top">无框架</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_top">
|
||||
<li><a href="allclasses-noframe.html">所有类</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_top");
|
||||
if(window==top) {
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</div>
|
||||
<a name="skip.navbar.top">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<div class="header">
|
||||
<h1 title="常量字段值" class="title">常量字段值</h1>
|
||||
<h2 title="目录">目录</h2>
|
||||
</div>
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<div class="bottomNav"><a name="navbar.bottom">
|
||||
<!-- -->
|
||||
</a>
|
||||
<div class="skipNav"><a href="#skip.navbar.bottom" title="跳过导航链接">跳过导航链接</a></div>
|
||||
<a name="navbar.bottom.firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="导航">
|
||||
<li><a href="com/ykl/package-summary.html">程序包</a></li>
|
||||
<li>类</li>
|
||||
<li>使用</li>
|
||||
<li><a href="overview-tree.html">树</a></li>
|
||||
<li><a href="deprecated-list.html">已过时</a></li>
|
||||
<li><a href="index-files/index-1.html">索引</a></li>
|
||||
<li><a href="help-doc.html">帮助</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li>上一个</li>
|
||||
<li>下一个</li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="index.html?constant-values.html" target="_top">框架</a></li>
|
||||
<li><a href="constant-values.html" target="_top">无框架</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_bottom">
|
||||
<li><a href="allclasses-noframe.html">所有类</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
||||
if(window==top) {
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</div>
|
||||
<a name="skip.navbar.bottom">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
</body>
|
||||
</html>
|
||||
123
Java源代码/deprecated-list.html
Normal file
@@ -0,0 +1,123 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!-- NewPage -->
|
||||
<html lang="zh">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_333) on Sun Jul 10 18:03:14 CST 2022 -->
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>已过时的列表</title>
|
||||
<meta name="date" content="2022-07-10">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="script.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript"><!--
|
||||
try {
|
||||
if (location.href.indexOf('is-external=true') == -1) {
|
||||
parent.document.title="\u5DF2\u8FC7\u65F6\u7684\u5217\u8868";
|
||||
}
|
||||
}
|
||||
catch(err) {
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
<noscript>
|
||||
<div>您的浏览器已禁用 JavaScript。</div>
|
||||
</noscript>
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="topNav"><a name="navbar.top">
|
||||
<!-- -->
|
||||
</a>
|
||||
<div class="skipNav"><a href="#skip.navbar.top" title="跳过导航链接">跳过导航链接</a></div>
|
||||
<a name="navbar.top.firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="导航">
|
||||
<li><a href="com/ykl/package-summary.html">程序包</a></li>
|
||||
<li>类</li>
|
||||
<li>使用</li>
|
||||
<li><a href="overview-tree.html">树</a></li>
|
||||
<li class="navBarCell1Rev">已过时</li>
|
||||
<li><a href="index-files/index-1.html">索引</a></li>
|
||||
<li><a href="help-doc.html">帮助</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li>上一个</li>
|
||||
<li>下一个</li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="index.html?deprecated-list.html" target="_top">框架</a></li>
|
||||
<li><a href="deprecated-list.html" target="_top">无框架</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_top">
|
||||
<li><a href="allclasses-noframe.html">所有类</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_top");
|
||||
if(window==top) {
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</div>
|
||||
<a name="skip.navbar.top">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<div class="header">
|
||||
<h1 title="已过时的 API" class="title">已过时的 API</h1>
|
||||
<h2 title="目录">目录</h2>
|
||||
</div>
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<div class="bottomNav"><a name="navbar.bottom">
|
||||
<!-- -->
|
||||
</a>
|
||||
<div class="skipNav"><a href="#skip.navbar.bottom" title="跳过导航链接">跳过导航链接</a></div>
|
||||
<a name="navbar.bottom.firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="导航">
|
||||
<li><a href="com/ykl/package-summary.html">程序包</a></li>
|
||||
<li>类</li>
|
||||
<li>使用</li>
|
||||
<li><a href="overview-tree.html">树</a></li>
|
||||
<li class="navBarCell1Rev">已过时</li>
|
||||
<li><a href="index-files/index-1.html">索引</a></li>
|
||||
<li><a href="help-doc.html">帮助</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li>上一个</li>
|
||||
<li>下一个</li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="index.html?deprecated-list.html" target="_top">框架</a></li>
|
||||
<li><a href="deprecated-list.html" target="_top">无框架</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_bottom">
|
||||
<li><a href="allclasses-noframe.html">所有类</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
||||
if(window==top) {
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</div>
|
||||
<a name="skip.navbar.bottom">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
</body>
|
||||
</html>
|
||||
224
Java源代码/help-doc.html
Normal file
@@ -0,0 +1,224 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!-- NewPage -->
|
||||
<html lang="zh">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_333) on Sun Jul 10 18:03:14 CST 2022 -->
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>API 帮助</title>
|
||||
<meta name="date" content="2022-07-10">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="script.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript"><!--
|
||||
try {
|
||||
if (location.href.indexOf('is-external=true') == -1) {
|
||||
parent.document.title="API \u5E2E\u52A9";
|
||||
}
|
||||
}
|
||||
catch(err) {
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
<noscript>
|
||||
<div>您的浏览器已禁用 JavaScript。</div>
|
||||
</noscript>
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="topNav"><a name="navbar.top">
|
||||
<!-- -->
|
||||
</a>
|
||||
<div class="skipNav"><a href="#skip.navbar.top" title="跳过导航链接">跳过导航链接</a></div>
|
||||
<a name="navbar.top.firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="导航">
|
||||
<li><a href="com/ykl/package-summary.html">程序包</a></li>
|
||||
<li>类</li>
|
||||
<li>使用</li>
|
||||
<li><a href="overview-tree.html">树</a></li>
|
||||
<li><a href="deprecated-list.html">已过时</a></li>
|
||||
<li><a href="index-files/index-1.html">索引</a></li>
|
||||
<li class="navBarCell1Rev">帮助</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li>上一个</li>
|
||||
<li>下一个</li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="index.html?help-doc.html" target="_top">框架</a></li>
|
||||
<li><a href="help-doc.html" target="_top">无框架</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_top">
|
||||
<li><a href="allclasses-noframe.html">所有类</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_top");
|
||||
if(window==top) {
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</div>
|
||||
<a name="skip.navbar.top">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<div class="header">
|
||||
<h1 class="title">此 API 文档的组织方式</h1>
|
||||
<div class="subTitle">此 API (应用程序编程接口) 文档包含对应于导航栏中的项目的页面, 如下所述。</div>
|
||||
</div>
|
||||
<div class="contentContainer">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h2>程序包</h2>
|
||||
<p>每个程序包都有一个页面, 其中包含它的类和接口的列表及其概要。此页面可以包含六个类别:</p>
|
||||
<ul>
|
||||
<li>接口 (斜体)</li>
|
||||
<li>类</li>
|
||||
<li>枚举</li>
|
||||
<li>异常错误</li>
|
||||
<li>错误</li>
|
||||
<li>注释类型</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="blockList">
|
||||
<h2>类/接口</h2>
|
||||
<p>每个类, 接口, 嵌套类和嵌套接口都有各自的页面。其中每个页面都由三部分 (类/接口说明, 概要表, 以及详细的成员说明) 组成:</p>
|
||||
<ul>
|
||||
<li>类继承图</li>
|
||||
<li>直接子类</li>
|
||||
<li>所有已知子接口</li>
|
||||
<li>所有已知实现类</li>
|
||||
<li>类/接口声明</li>
|
||||
<li>类/接口说明</li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li>嵌套类概要</li>
|
||||
<li>字段概要</li>
|
||||
<li>构造器概要</li>
|
||||
<li>方法概要</li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li>字段详细资料</li>
|
||||
<li>构造器详细资料</li>
|
||||
<li>方法详细资料</li>
|
||||
</ul>
|
||||
<p>每个概要条目都包含该项目的详细说明的第一句。概要条目按字母顺序排列, 而详细说明则按其在源代码中出现的顺序排列。这样保持了程序员所建立的逻辑分组。</p>
|
||||
</li>
|
||||
<li class="blockList">
|
||||
<h2>注释类型</h2>
|
||||
<p>每个注释类型都有各自的页面, 其中包含以下部分:</p>
|
||||
<ul>
|
||||
<li>注释类型声明</li>
|
||||
<li>注释类型说明</li>
|
||||
<li>必需元素概要</li>
|
||||
<li>可选元素概要</li>
|
||||
<li>元素详细资料</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="blockList">
|
||||
<h2>枚举</h2>
|
||||
<p>每个枚举都有各自的页面, 其中包含以下部分:</p>
|
||||
<ul>
|
||||
<li>枚举声明</li>
|
||||
<li>枚举说明</li>
|
||||
<li>枚举常量概要</li>
|
||||
<li>枚举常量详细资料</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="blockList">
|
||||
<h2>使用</h2>
|
||||
<p>每个已文档化的程序包, 类和接口都有各自的“使用”页面。此页面介绍了使用给定类或程序包的任何部分的程序包, 类, 方法, 构造器和字段。对于给定的类或接口 A, 其“使用”页面包含 A 的子类, 声明为 A 的字段, 返回 A 的方法, 以及带有类型为 A 的参数的方法和构造器。访问此页面的方法是: 首先转至程序包, 类或接口, 然后单击导航栏中的 "使用" 链接。</p>
|
||||
</li>
|
||||
<li class="blockList">
|
||||
<h2>树 (类分层结构)</h2>
|
||||
<p>对于所有程序包, 有一个<a href="overview-tree.html">类分层结构</a>页面, 以及每个程序包的分层结构。每个分层结构页面都包含类的列表和接口的列表。从<code>java.lang.Object</code>开始, 按继承结构对类进行排列。接口不从<code>java.lang.Object</code>继承。</p>
|
||||
<ul>
|
||||
<li>查看“概览”页面时, 单击 "树" 将显示所有程序包的分层结构。</li>
|
||||
<li>查看特定程序包, 类或接口页面时, 单击 "树" 将仅显示该程序包的分层结构。</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="blockList">
|
||||
<h2>已过时的 API</h2>
|
||||
<p><a href="deprecated-list.html">已过时的 API</a> 页面列出了所有已过时的 API。一般由于进行了改进并且通常提供了替代的 API, 所以建议不要使用已过时的 API。在将来的实现过程中, 可能会删除已过时的 API。</p>
|
||||
</li>
|
||||
<li class="blockList">
|
||||
<h2>索引</h2>
|
||||
<p><a href="index-files/index-1.html">索引</a> 包含按字母顺序排列的所有类, 接口, 构造器, 方法和字段的列表。</p>
|
||||
</li>
|
||||
<li class="blockList">
|
||||
<h2>上一个/下一个</h2>
|
||||
<p>这些链接使您可以转至下一个或上一个类, 接口, 程序包或相关页面。</p>
|
||||
</li>
|
||||
<li class="blockList">
|
||||
<h2>框架/无框架</h2>
|
||||
<p>这些链接用于显示和隐藏 HTML 框架。所有页面均具有有框架和无框架两种显示方式。</p>
|
||||
</li>
|
||||
<li class="blockList">
|
||||
<h2>所有类</h2>
|
||||
<p><a href="allclasses-noframe.html">所有类</a>链接显示所有类和接口 (除了非静态嵌套类型)。</p>
|
||||
</li>
|
||||
<li class="blockList">
|
||||
<h2>序列化表格</h2>
|
||||
<p>每个可序列化或可外部化的类都有其序列化字段和方法的说明。此信息对重新实现者有用, 而对使用 API 的开发者则没有什么用处。尽管导航栏中没有链接, 但您可以通过下列方式获取此信息: 转至任何序列化类, 然后单击类说明的 "另请参阅" 部分中的 "序列化表格"。</p>
|
||||
</li>
|
||||
<li class="blockList">
|
||||
<h2>常量字段值</h2>
|
||||
<p><a href="constant-values.html">常量字段值</a>页面列出了静态最终字段及其值。</p>
|
||||
</li>
|
||||
</ul>
|
||||
<span class="emphasizedPhrase">此帮助文件适用于使用标准 doclet 生成的 API 文档。</span></div>
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<div class="bottomNav"><a name="navbar.bottom">
|
||||
<!-- -->
|
||||
</a>
|
||||
<div class="skipNav"><a href="#skip.navbar.bottom" title="跳过导航链接">跳过导航链接</a></div>
|
||||
<a name="navbar.bottom.firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="导航">
|
||||
<li><a href="com/ykl/package-summary.html">程序包</a></li>
|
||||
<li>类</li>
|
||||
<li>使用</li>
|
||||
<li><a href="overview-tree.html">树</a></li>
|
||||
<li><a href="deprecated-list.html">已过时</a></li>
|
||||
<li><a href="index-files/index-1.html">索引</a></li>
|
||||
<li class="navBarCell1Rev">帮助</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li>上一个</li>
|
||||
<li>下一个</li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="index.html?help-doc.html" target="_top">框架</a></li>
|
||||
<li><a href="help-doc.html" target="_top">无框架</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_bottom">
|
||||
<li><a href="allclasses-noframe.html">所有类</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
||||
if(window==top) {
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</div>
|
||||
<a name="skip.navbar.bottom">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
</body>
|
||||
</html>
|
||||
128
Java源代码/index-files/index-1.html
Normal file
@@ -0,0 +1,128 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!-- NewPage -->
|
||||
<html lang="zh">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_333) on Sun Jul 10 18:03:14 CST 2022 -->
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>C - 索引</title>
|
||||
<meta name="date" content="2022-07-10">
|
||||
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../script.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript"><!--
|
||||
try {
|
||||
if (location.href.indexOf('is-external=true') == -1) {
|
||||
parent.document.title="C - \u7D22\u5F15";
|
||||
}
|
||||
}
|
||||
catch(err) {
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
<noscript>
|
||||
<div>您的浏览器已禁用 JavaScript。</div>
|
||||
</noscript>
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="topNav"><a name="navbar.top">
|
||||
<!-- -->
|
||||
</a>
|
||||
<div class="skipNav"><a href="#skip.navbar.top" title="跳过导航链接">跳过导航链接</a></div>
|
||||
<a name="navbar.top.firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="导航">
|
||||
<li><a href="../com/ykl/package-summary.html">程序包</a></li>
|
||||
<li>类</li>
|
||||
<li>使用</li>
|
||||
<li><a href="../overview-tree.html">树</a></li>
|
||||
<li><a href="../deprecated-list.html">已过时</a></li>
|
||||
<li class="navBarCell1Rev">索引</li>
|
||||
<li><a href="../help-doc.html">帮助</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li>上一个字母</li>
|
||||
<li><a href="index-2.html">下一个字母</a></li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="../index.html?index-files/index-1.html" target="_top">框架</a></li>
|
||||
<li><a href="index-1.html" target="_top">无框架</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_top">
|
||||
<li><a href="../allclasses-noframe.html">所有类</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_top");
|
||||
if(window==top) {
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</div>
|
||||
<a name="skip.navbar.top">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<div class="contentContainer"><a href="index-1.html">C</a> <a href="index-2.html">D</a> <a href="index-3.html">H</a> <a href="index-4.html">M</a> <a name="I:C">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h2 class="title">C</h2>
|
||||
<dl>
|
||||
<dt><a href="../com/ykl/package-summary.html">com.ykl</a> - 程序包 com.ykl</dt>
|
||||
<dd> </dd>
|
||||
</dl>
|
||||
<a href="index-1.html">C</a> <a href="index-2.html">D</a> <a href="index-3.html">H</a> <a href="index-4.html">M</a> </div>
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<div class="bottomNav"><a name="navbar.bottom">
|
||||
<!-- -->
|
||||
</a>
|
||||
<div class="skipNav"><a href="#skip.navbar.bottom" title="跳过导航链接">跳过导航链接</a></div>
|
||||
<a name="navbar.bottom.firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="导航">
|
||||
<li><a href="../com/ykl/package-summary.html">程序包</a></li>
|
||||
<li>类</li>
|
||||
<li>使用</li>
|
||||
<li><a href="../overview-tree.html">树</a></li>
|
||||
<li><a href="../deprecated-list.html">已过时</a></li>
|
||||
<li class="navBarCell1Rev">索引</li>
|
||||
<li><a href="../help-doc.html">帮助</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li>上一个字母</li>
|
||||
<li><a href="index-2.html">下一个字母</a></li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="../index.html?index-files/index-1.html" target="_top">框架</a></li>
|
||||
<li><a href="index-1.html" target="_top">无框架</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_bottom">
|
||||
<li><a href="../allclasses-noframe.html">所有类</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
||||
if(window==top) {
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</div>
|
||||
<a name="skip.navbar.bottom">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
</body>
|
||||
</html>
|
||||
130
Java源代码/index-files/index-2.html
Normal file
@@ -0,0 +1,130 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!-- NewPage -->
|
||||
<html lang="zh">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_333) on Sun Jul 10 18:03:14 CST 2022 -->
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>D - 索引</title>
|
||||
<meta name="date" content="2022-07-10">
|
||||
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../script.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript"><!--
|
||||
try {
|
||||
if (location.href.indexOf('is-external=true') == -1) {
|
||||
parent.document.title="D - \u7D22\u5F15";
|
||||
}
|
||||
}
|
||||
catch(err) {
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
<noscript>
|
||||
<div>您的浏览器已禁用 JavaScript。</div>
|
||||
</noscript>
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="topNav"><a name="navbar.top">
|
||||
<!-- -->
|
||||
</a>
|
||||
<div class="skipNav"><a href="#skip.navbar.top" title="跳过导航链接">跳过导航链接</a></div>
|
||||
<a name="navbar.top.firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="导航">
|
||||
<li><a href="../com/ykl/package-summary.html">程序包</a></li>
|
||||
<li>类</li>
|
||||
<li>使用</li>
|
||||
<li><a href="../overview-tree.html">树</a></li>
|
||||
<li><a href="../deprecated-list.html">已过时</a></li>
|
||||
<li class="navBarCell1Rev">索引</li>
|
||||
<li><a href="../help-doc.html">帮助</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li><a href="index-1.html">上一个字母</a></li>
|
||||
<li><a href="index-3.html">下一个字母</a></li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="../index.html?index-files/index-2.html" target="_top">框架</a></li>
|
||||
<li><a href="index-2.html" target="_top">无框架</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_top">
|
||||
<li><a href="../allclasses-noframe.html">所有类</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_top");
|
||||
if(window==top) {
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</div>
|
||||
<a name="skip.navbar.top">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<div class="contentContainer"><a href="index-1.html">C</a> <a href="index-2.html">D</a> <a href="index-3.html">H</a> <a href="index-4.html">M</a> <a name="I:D">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h2 class="title">D</h2>
|
||||
<dl>
|
||||
<dt><a href="../com/ykl/Demo5.html" title="com.ykl中的类"><span class="typeNameLink">Demo5</span></a> - <a href="../com/ykl/package-summary.html">com.ykl</a>中的类</dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="memberNameLink"><a href="../com/ykl/Demo5.html#Demo5--">Demo5()</a></span> - 类 的构造器com.ykl.<a href="../com/ykl/Demo5.html" title="com.ykl中的类">Demo5</a></dt>
|
||||
<dd> </dd>
|
||||
</dl>
|
||||
<a href="index-1.html">C</a> <a href="index-2.html">D</a> <a href="index-3.html">H</a> <a href="index-4.html">M</a> </div>
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<div class="bottomNav"><a name="navbar.bottom">
|
||||
<!-- -->
|
||||
</a>
|
||||
<div class="skipNav"><a href="#skip.navbar.bottom" title="跳过导航链接">跳过导航链接</a></div>
|
||||
<a name="navbar.bottom.firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="导航">
|
||||
<li><a href="../com/ykl/package-summary.html">程序包</a></li>
|
||||
<li>类</li>
|
||||
<li>使用</li>
|
||||
<li><a href="../overview-tree.html">树</a></li>
|
||||
<li><a href="../deprecated-list.html">已过时</a></li>
|
||||
<li class="navBarCell1Rev">索引</li>
|
||||
<li><a href="../help-doc.html">帮助</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li><a href="index-1.html">上一个字母</a></li>
|
||||
<li><a href="index-3.html">下一个字母</a></li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="../index.html?index-files/index-2.html" target="_top">框架</a></li>
|
||||
<li><a href="index-2.html" target="_top">无框架</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_bottom">
|
||||
<li><a href="../allclasses-noframe.html">所有类</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
||||
if(window==top) {
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</div>
|
||||
<a name="skip.navbar.bottom">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
</body>
|
||||
</html>
|
||||
130
Java源代码/index-files/index-3.html
Normal file
@@ -0,0 +1,130 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!-- NewPage -->
|
||||
<html lang="zh">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_333) on Sun Jul 10 18:03:14 CST 2022 -->
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>H - 索引</title>
|
||||
<meta name="date" content="2022-07-10">
|
||||
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../script.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript"><!--
|
||||
try {
|
||||
if (location.href.indexOf('is-external=true') == -1) {
|
||||
parent.document.title="H - \u7D22\u5F15";
|
||||
}
|
||||
}
|
||||
catch(err) {
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
<noscript>
|
||||
<div>您的浏览器已禁用 JavaScript。</div>
|
||||
</noscript>
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="topNav"><a name="navbar.top">
|
||||
<!-- -->
|
||||
</a>
|
||||
<div class="skipNav"><a href="#skip.navbar.top" title="跳过导航链接">跳过导航链接</a></div>
|
||||
<a name="navbar.top.firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="导航">
|
||||
<li><a href="../com/ykl/package-summary.html">程序包</a></li>
|
||||
<li>类</li>
|
||||
<li>使用</li>
|
||||
<li><a href="../overview-tree.html">树</a></li>
|
||||
<li><a href="../deprecated-list.html">已过时</a></li>
|
||||
<li class="navBarCell1Rev">索引</li>
|
||||
<li><a href="../help-doc.html">帮助</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li><a href="index-2.html">上一个字母</a></li>
|
||||
<li><a href="index-4.html">下一个字母</a></li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="../index.html?index-files/index-3.html" target="_top">框架</a></li>
|
||||
<li><a href="index-3.html" target="_top">无框架</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_top">
|
||||
<li><a href="../allclasses-noframe.html">所有类</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_top");
|
||||
if(window==top) {
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</div>
|
||||
<a name="skip.navbar.top">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<div class="contentContainer"><a href="index-1.html">C</a> <a href="index-2.html">D</a> <a href="index-3.html">H</a> <a href="index-4.html">M</a> <a name="I:H">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h2 class="title">H</h2>
|
||||
<dl>
|
||||
<dt><a href="../com/ykl/HelloWorld.html" title="com.ykl中的类"><span class="typeNameLink">HelloWorld</span></a> - <a href="../com/ykl/package-summary.html">com.ykl</a>中的类</dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="memberNameLink"><a href="../com/ykl/HelloWorld.html#HelloWorld--">HelloWorld()</a></span> - 类 的构造器com.ykl.<a href="../com/ykl/HelloWorld.html" title="com.ykl中的类">HelloWorld</a></dt>
|
||||
<dd> </dd>
|
||||
</dl>
|
||||
<a href="index-1.html">C</a> <a href="index-2.html">D</a> <a href="index-3.html">H</a> <a href="index-4.html">M</a> </div>
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<div class="bottomNav"><a name="navbar.bottom">
|
||||
<!-- -->
|
||||
</a>
|
||||
<div class="skipNav"><a href="#skip.navbar.bottom" title="跳过导航链接">跳过导航链接</a></div>
|
||||
<a name="navbar.bottom.firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="导航">
|
||||
<li><a href="../com/ykl/package-summary.html">程序包</a></li>
|
||||
<li>类</li>
|
||||
<li>使用</li>
|
||||
<li><a href="../overview-tree.html">树</a></li>
|
||||
<li><a href="../deprecated-list.html">已过时</a></li>
|
||||
<li class="navBarCell1Rev">索引</li>
|
||||
<li><a href="../help-doc.html">帮助</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li><a href="index-2.html">上一个字母</a></li>
|
||||
<li><a href="index-4.html">下一个字母</a></li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="../index.html?index-files/index-3.html" target="_top">框架</a></li>
|
||||
<li><a href="index-3.html" target="_top">无框架</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_bottom">
|
||||
<li><a href="../allclasses-noframe.html">所有类</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
||||
if(window==top) {
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</div>
|
||||
<a name="skip.navbar.bottom">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
</body>
|
||||
</html>
|
||||
130
Java源代码/index-files/index-4.html
Normal file
@@ -0,0 +1,130 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!-- NewPage -->
|
||||
<html lang="zh">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_333) on Sun Jul 10 18:03:14 CST 2022 -->
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>M - 索引</title>
|
||||
<meta name="date" content="2022-07-10">
|
||||
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../script.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript"><!--
|
||||
try {
|
||||
if (location.href.indexOf('is-external=true') == -1) {
|
||||
parent.document.title="M - \u7D22\u5F15";
|
||||
}
|
||||
}
|
||||
catch(err) {
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
<noscript>
|
||||
<div>您的浏览器已禁用 JavaScript。</div>
|
||||
</noscript>
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="topNav"><a name="navbar.top">
|
||||
<!-- -->
|
||||
</a>
|
||||
<div class="skipNav"><a href="#skip.navbar.top" title="跳过导航链接">跳过导航链接</a></div>
|
||||
<a name="navbar.top.firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="导航">
|
||||
<li><a href="../com/ykl/package-summary.html">程序包</a></li>
|
||||
<li>类</li>
|
||||
<li>使用</li>
|
||||
<li><a href="../overview-tree.html">树</a></li>
|
||||
<li><a href="../deprecated-list.html">已过时</a></li>
|
||||
<li class="navBarCell1Rev">索引</li>
|
||||
<li><a href="../help-doc.html">帮助</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li><a href="index-3.html">上一个字母</a></li>
|
||||
<li>下一个字母</li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="../index.html?index-files/index-4.html" target="_top">框架</a></li>
|
||||
<li><a href="index-4.html" target="_top">无框架</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_top">
|
||||
<li><a href="../allclasses-noframe.html">所有类</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_top");
|
||||
if(window==top) {
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</div>
|
||||
<a name="skip.navbar.top">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<div class="contentContainer"><a href="index-1.html">C</a> <a href="index-2.html">D</a> <a href="index-3.html">H</a> <a href="index-4.html">M</a> <a name="I:M">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h2 class="title">M</h2>
|
||||
<dl>
|
||||
<dt><span class="memberNameLink"><a href="../com/ykl/Demo5.html#main-java.lang.String:A-">main(String[])</a></span> - 类 中的静态方法com.ykl.<a href="../com/ykl/Demo5.html" title="com.ykl中的类">Demo5</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="memberNameLink"><a href="../com/ykl/HelloWorld.html#main-java.lang.String:A-">main(String[])</a></span> - 类 中的静态方法com.ykl.<a href="../com/ykl/HelloWorld.html" title="com.ykl中的类">HelloWorld</a></dt>
|
||||
<dd> </dd>
|
||||
</dl>
|
||||
<a href="index-1.html">C</a> <a href="index-2.html">D</a> <a href="index-3.html">H</a> <a href="index-4.html">M</a> </div>
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<div class="bottomNav"><a name="navbar.bottom">
|
||||
<!-- -->
|
||||
</a>
|
||||
<div class="skipNav"><a href="#skip.navbar.bottom" title="跳过导航链接">跳过导航链接</a></div>
|
||||
<a name="navbar.bottom.firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="导航">
|
||||
<li><a href="../com/ykl/package-summary.html">程序包</a></li>
|
||||
<li>类</li>
|
||||
<li>使用</li>
|
||||
<li><a href="../overview-tree.html">树</a></li>
|
||||
<li><a href="../deprecated-list.html">已过时</a></li>
|
||||
<li class="navBarCell1Rev">索引</li>
|
||||
<li><a href="../help-doc.html">帮助</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li><a href="index-3.html">上一个字母</a></li>
|
||||
<li>下一个字母</li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="../index.html?index-files/index-4.html" target="_top">框架</a></li>
|
||||
<li><a href="index-4.html" target="_top">无框架</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_bottom">
|
||||
<li><a href="../allclasses-noframe.html">所有类</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
||||
if(window==top) {
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</div>
|
||||
<a name="skip.navbar.bottom">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
</body>
|
||||
</html>
|
||||
73
Java源代码/index.html
Normal file
@@ -0,0 +1,73 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
|
||||
<!-- NewPage -->
|
||||
<html lang="zh">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_333) on Sun Jul 10 18:03:14 CST 2022 -->
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>生成的文档 (无标题)</title>
|
||||
<script type="text/javascript">
|
||||
tmpTargetPage = "" + window.location.search;
|
||||
if (tmpTargetPage != "" && tmpTargetPage != "undefined")
|
||||
tmpTargetPage = tmpTargetPage.substring(1);
|
||||
if (tmpTargetPage.indexOf(":") != -1 || (tmpTargetPage != "" && !validURL(tmpTargetPage)))
|
||||
tmpTargetPage = "undefined";
|
||||
targetPage = tmpTargetPage;
|
||||
function validURL(url) {
|
||||
try {
|
||||
url = decodeURIComponent(url);
|
||||
}
|
||||
catch (error) {
|
||||
return false;
|
||||
}
|
||||
var pos = url.indexOf(".html");
|
||||
if (pos == -1 || pos != url.length - 5)
|
||||
return false;
|
||||
var allowNumber = false;
|
||||
var allowSep = false;
|
||||
var seenDot = false;
|
||||
for (var i = 0; i < url.length - 5; i++) {
|
||||
var ch = url.charAt(i);
|
||||
if ('a' <= ch && ch <= 'z' ||
|
||||
'A' <= ch && ch <= 'Z' ||
|
||||
ch == '$' ||
|
||||
ch == '_' ||
|
||||
ch.charCodeAt(0) > 127) {
|
||||
allowNumber = true;
|
||||
allowSep = true;
|
||||
} else if ('0' <= ch && ch <= '9'
|
||||
|| ch == '-') {
|
||||
if (!allowNumber)
|
||||
return false;
|
||||
} else if (ch == '/' || ch == '.') {
|
||||
if (!allowSep)
|
||||
return false;
|
||||
allowNumber = false;
|
||||
allowSep = false;
|
||||
if (ch == '.')
|
||||
seenDot = true;
|
||||
if (ch == '/' && seenDot)
|
||||
return false;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
function loadFrames() {
|
||||
if (targetPage != "" && targetPage != "undefined")
|
||||
top.classFrame.location = top.targetPage;
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<frameset cols="20%,80%" title="Documentation frame" onload="top.loadFrames()">
|
||||
<frame src="allclasses-frame.html" name="packageFrame" title="所有类和接口 (除了非静态嵌套类型)">
|
||||
<frame src="com/ykl/package-summary.html" name="classFrame" title="程序包, 类和接口说明" scrolling="yes">
|
||||
<noframes>
|
||||
<noscript>
|
||||
<div>您的浏览器已禁用 JavaScript。</div>
|
||||
</noscript>
|
||||
<h2>框架预警</h2>
|
||||
<p>请使用框架功能查看此文档。如果看到此消息, 则表明您使用的是不支持框架的 Web 客户机。链接到<a href="com/ykl/package-summary.html">非框架版本</a>。</p>
|
||||
</noframes>
|
||||
</frameset>
|
||||
</html>
|
||||
137
Java源代码/overview-tree.html
Normal file
@@ -0,0 +1,137 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!-- NewPage -->
|
||||
<html lang="zh">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_333) on Sun Jul 10 18:03:14 CST 2022 -->
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>类分层结构</title>
|
||||
<meta name="date" content="2022-07-10">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="script.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript"><!--
|
||||
try {
|
||||
if (location.href.indexOf('is-external=true') == -1) {
|
||||
parent.document.title="\u7C7B\u5206\u5C42\u7ED3\u6784";
|
||||
}
|
||||
}
|
||||
catch(err) {
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
<noscript>
|
||||
<div>您的浏览器已禁用 JavaScript。</div>
|
||||
</noscript>
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="topNav"><a name="navbar.top">
|
||||
<!-- -->
|
||||
</a>
|
||||
<div class="skipNav"><a href="#skip.navbar.top" title="跳过导航链接">跳过导航链接</a></div>
|
||||
<a name="navbar.top.firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="导航">
|
||||
<li><a href="com/ykl/package-summary.html">程序包</a></li>
|
||||
<li>类</li>
|
||||
<li>使用</li>
|
||||
<li class="navBarCell1Rev">树</li>
|
||||
<li><a href="deprecated-list.html">已过时</a></li>
|
||||
<li><a href="index-files/index-1.html">索引</a></li>
|
||||
<li><a href="help-doc.html">帮助</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li>上一个</li>
|
||||
<li>下一个</li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="index.html?overview-tree.html" target="_top">框架</a></li>
|
||||
<li><a href="overview-tree.html" target="_top">无框架</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_top">
|
||||
<li><a href="allclasses-noframe.html">所有类</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_top");
|
||||
if(window==top) {
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</div>
|
||||
<a name="skip.navbar.top">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<div class="header">
|
||||
<h1 class="title">所有程序包的分层结构</h1>
|
||||
<span class="packageHierarchyLabel">程序包分层结构:</span>
|
||||
<ul class="horizontal">
|
||||
<li><a href="com/ykl/package-tree.html">com.ykl</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="contentContainer">
|
||||
<h2 title="类分层结构">类分层结构</h2>
|
||||
<ul>
|
||||
<li type="circle">java.lang.Object
|
||||
<ul>
|
||||
<li type="circle">com.ykl.<a href="com/ykl/Demo5.html" title="com.ykl中的类"><span class="typeNameLink">Demo5</span></a></li>
|
||||
<li type="circle">com.ykl.<a href="com/ykl/HelloWorld.html" title="com.ykl中的类"><span class="typeNameLink">HelloWorld</span></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<div class="bottomNav"><a name="navbar.bottom">
|
||||
<!-- -->
|
||||
</a>
|
||||
<div class="skipNav"><a href="#skip.navbar.bottom" title="跳过导航链接">跳过导航链接</a></div>
|
||||
<a name="navbar.bottom.firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="导航">
|
||||
<li><a href="com/ykl/package-summary.html">程序包</a></li>
|
||||
<li>类</li>
|
||||
<li>使用</li>
|
||||
<li class="navBarCell1Rev">树</li>
|
||||
<li><a href="deprecated-list.html">已过时</a></li>
|
||||
<li><a href="index-files/index-1.html">索引</a></li>
|
||||
<li><a href="help-doc.html">帮助</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li>上一个</li>
|
||||
<li>下一个</li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="index.html?overview-tree.html" target="_top">框架</a></li>
|
||||
<li><a href="overview-tree.html" target="_top">无框架</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_bottom">
|
||||
<li><a href="allclasses-noframe.html">所有类</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
||||
if(window==top) {
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</div>
|
||||
<a name="skip.navbar.bottom">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
</body>
|
||||
</html>
|
||||
1
Java源代码/package-list
Normal file
@@ -0,0 +1 @@
|
||||
com.ykl
|
||||
30
Java源代码/script.js
Normal file
@@ -0,0 +1,30 @@
|
||||
function show(type)
|
||||
{
|
||||
count = 0;
|
||||
for (var key in methods) {
|
||||
var row = document.getElementById(key);
|
||||
if ((methods[key] & type) != 0) {
|
||||
row.style.display = '';
|
||||
row.className = (count++ % 2) ? rowColor : altColor;
|
||||
}
|
||||
else
|
||||
row.style.display = 'none';
|
||||
}
|
||||
updateTabs(type);
|
||||
}
|
||||
|
||||
function updateTabs(type)
|
||||
{
|
||||
for (var value in tabs) {
|
||||
var sNode = document.getElementById(tabs[value][0]);
|
||||
var spanNode = sNode.firstChild;
|
||||
if (value == type) {
|
||||
sNode.className = activeTableTab;
|
||||
spanNode.innerHTML = tabs[value][1];
|
||||
}
|
||||
else {
|
||||
sNode.className = tableTab;
|
||||
spanNode.innerHTML = "<a href=\"javascript:show("+ value + ");\">" + tabs[value][1] + "</a>";
|
||||
}
|
||||
}
|
||||
}
|
||||
574
Java源代码/stylesheet.css
Normal file
@@ -0,0 +1,574 @@
|
||||
/* Javadoc style sheet */
|
||||
/*
|
||||
Overall document style
|
||||
*/
|
||||
|
||||
@import url('resources/fonts/dejavu.css');
|
||||
|
||||
body {
|
||||
background-color:#ffffff;
|
||||
color:#353833;
|
||||
font-family:'DejaVu Sans', Arial, Helvetica, sans-serif;
|
||||
font-size:14px;
|
||||
margin:0;
|
||||
}
|
||||
a:link, a:visited {
|
||||
text-decoration:none;
|
||||
color:#4A6782;
|
||||
}
|
||||
a:hover, a:focus {
|
||||
text-decoration:none;
|
||||
color:#bb7a2a;
|
||||
}
|
||||
a:active {
|
||||
text-decoration:none;
|
||||
color:#4A6782;
|
||||
}
|
||||
a[name] {
|
||||
color:#353833;
|
||||
}
|
||||
a[name]:hover {
|
||||
text-decoration:none;
|
||||
color:#353833;
|
||||
}
|
||||
pre {
|
||||
font-family:'DejaVu Sans Mono', monospace;
|
||||
font-size:14px;
|
||||
}
|
||||
h1 {
|
||||
font-size:20px;
|
||||
}
|
||||
h2 {
|
||||
font-size:18px;
|
||||
}
|
||||
h3 {
|
||||
font-size:16px;
|
||||
font-style:italic;
|
||||
}
|
||||
h4 {
|
||||
font-size:13px;
|
||||
}
|
||||
h5 {
|
||||
font-size:12px;
|
||||
}
|
||||
h6 {
|
||||
font-size:11px;
|
||||
}
|
||||
ul {
|
||||
list-style-type:disc;
|
||||
}
|
||||
code, tt {
|
||||
font-family:'DejaVu Sans Mono', monospace;
|
||||
font-size:14px;
|
||||
padding-top:4px;
|
||||
margin-top:8px;
|
||||
line-height:1.4em;
|
||||
}
|
||||
dt code {
|
||||
font-family:'DejaVu Sans Mono', monospace;
|
||||
font-size:14px;
|
||||
padding-top:4px;
|
||||
}
|
||||
table tr td dt code {
|
||||
font-family:'DejaVu Sans Mono', monospace;
|
||||
font-size:14px;
|
||||
vertical-align:top;
|
||||
padding-top:4px;
|
||||
}
|
||||
sup {
|
||||
font-size:8px;
|
||||
}
|
||||
/*
|
||||
Document title and Copyright styles
|
||||
*/
|
||||
.clear {
|
||||
clear:both;
|
||||
height:0px;
|
||||
overflow:hidden;
|
||||
}
|
||||
.aboutLanguage {
|
||||
float:right;
|
||||
padding:0px 21px;
|
||||
font-size:11px;
|
||||
z-index:200;
|
||||
margin-top:-9px;
|
||||
}
|
||||
.legalCopy {
|
||||
margin-left:.5em;
|
||||
}
|
||||
.bar a, .bar a:link, .bar a:visited, .bar a:active {
|
||||
color:#FFFFFF;
|
||||
text-decoration:none;
|
||||
}
|
||||
.bar a:hover, .bar a:focus {
|
||||
color:#bb7a2a;
|
||||
}
|
||||
.tab {
|
||||
background-color:#0066FF;
|
||||
color:#ffffff;
|
||||
padding:8px;
|
||||
width:5em;
|
||||
font-weight:bold;
|
||||
}
|
||||
/*
|
||||
Navigation bar styles
|
||||
*/
|
||||
.bar {
|
||||
background-color:#4D7A97;
|
||||
color:#FFFFFF;
|
||||
padding:.8em .5em .4em .8em;
|
||||
height:auto;/*height:1.8em;*/
|
||||
font-size:11px;
|
||||
margin:0;
|
||||
}
|
||||
.topNav {
|
||||
background-color:#4D7A97;
|
||||
color:#FFFFFF;
|
||||
float:left;
|
||||
padding:0;
|
||||
width:100%;
|
||||
clear:right;
|
||||
height:2.8em;
|
||||
padding-top:10px;
|
||||
overflow:hidden;
|
||||
font-size:12px;
|
||||
}
|
||||
.bottomNav {
|
||||
margin-top:10px;
|
||||
background-color:#4D7A97;
|
||||
color:#FFFFFF;
|
||||
float:left;
|
||||
padding:0;
|
||||
width:100%;
|
||||
clear:right;
|
||||
height:2.8em;
|
||||
padding-top:10px;
|
||||
overflow:hidden;
|
||||
font-size:12px;
|
||||
}
|
||||
.subNav {
|
||||
background-color:#dee3e9;
|
||||
float:left;
|
||||
width:100%;
|
||||
overflow:hidden;
|
||||
font-size:12px;
|
||||
}
|
||||
.subNav div {
|
||||
clear:left;
|
||||
float:left;
|
||||
padding:0 0 5px 6px;
|
||||
text-transform:uppercase;
|
||||
}
|
||||
ul.navList, ul.subNavList {
|
||||
float:left;
|
||||
margin:0 25px 0 0;
|
||||
padding:0;
|
||||
}
|
||||
ul.navList li{
|
||||
list-style:none;
|
||||
float:left;
|
||||
padding: 5px 6px;
|
||||
text-transform:uppercase;
|
||||
}
|
||||
ul.subNavList li{
|
||||
list-style:none;
|
||||
float:left;
|
||||
}
|
||||
.topNav a:link, .topNav a:active, .topNav a:visited, .bottomNav a:link, .bottomNav a:active, .bottomNav a:visited {
|
||||
color:#FFFFFF;
|
||||
text-decoration:none;
|
||||
text-transform:uppercase;
|
||||
}
|
||||
.topNav a:hover, .bottomNav a:hover {
|
||||
text-decoration:none;
|
||||
color:#bb7a2a;
|
||||
text-transform:uppercase;
|
||||
}
|
||||
.navBarCell1Rev {
|
||||
background-color:#F8981D;
|
||||
color:#253441;
|
||||
margin: auto 5px;
|
||||
}
|
||||
.skipNav {
|
||||
position:absolute;
|
||||
top:auto;
|
||||
left:-9999px;
|
||||
overflow:hidden;
|
||||
}
|
||||
/*
|
||||
Page header and footer styles
|
||||
*/
|
||||
.header, .footer {
|
||||
clear:both;
|
||||
margin:0 20px;
|
||||
padding:5px 0 0 0;
|
||||
}
|
||||
.indexHeader {
|
||||
margin:10px;
|
||||
position:relative;
|
||||
}
|
||||
.indexHeader span{
|
||||
margin-right:15px;
|
||||
}
|
||||
.indexHeader h1 {
|
||||
font-size:13px;
|
||||
}
|
||||
.title {
|
||||
color:#2c4557;
|
||||
margin:10px 0;
|
||||
}
|
||||
.subTitle {
|
||||
margin:5px 0 0 0;
|
||||
}
|
||||
.header ul {
|
||||
margin:0 0 15px 0;
|
||||
padding:0;
|
||||
}
|
||||
.footer ul {
|
||||
margin:20px 0 5px 0;
|
||||
}
|
||||
.header ul li, .footer ul li {
|
||||
list-style:none;
|
||||
font-size:13px;
|
||||
}
|
||||
/*
|
||||
Heading styles
|
||||
*/
|
||||
div.details ul.blockList ul.blockList ul.blockList li.blockList h4, div.details ul.blockList ul.blockList ul.blockListLast li.blockList h4 {
|
||||
background-color:#dee3e9;
|
||||
border:1px solid #d0d9e0;
|
||||
margin:0 0 6px -8px;
|
||||
padding:7px 5px;
|
||||
}
|
||||
ul.blockList ul.blockList ul.blockList li.blockList h3 {
|
||||
background-color:#dee3e9;
|
||||
border:1px solid #d0d9e0;
|
||||
margin:0 0 6px -8px;
|
||||
padding:7px 5px;
|
||||
}
|
||||
ul.blockList ul.blockList li.blockList h3 {
|
||||
padding:0;
|
||||
margin:15px 0;
|
||||
}
|
||||
ul.blockList li.blockList h2 {
|
||||
padding:0px 0 20px 0;
|
||||
}
|
||||
/*
|
||||
Page layout container styles
|
||||
*/
|
||||
.contentContainer, .sourceContainer, .classUseContainer, .serializedFormContainer, .constantValuesContainer {
|
||||
clear:both;
|
||||
padding:10px 20px;
|
||||
position:relative;
|
||||
}
|
||||
.indexContainer {
|
||||
margin:10px;
|
||||
position:relative;
|
||||
font-size:12px;
|
||||
}
|
||||
.indexContainer h2 {
|
||||
font-size:13px;
|
||||
padding:0 0 3px 0;
|
||||
}
|
||||
.indexContainer ul {
|
||||
margin:0;
|
||||
padding:0;
|
||||
}
|
||||
.indexContainer ul li {
|
||||
list-style:none;
|
||||
padding-top:2px;
|
||||
}
|
||||
.contentContainer .description dl dt, .contentContainer .details dl dt, .serializedFormContainer dl dt {
|
||||
font-size:12px;
|
||||
font-weight:bold;
|
||||
margin:10px 0 0 0;
|
||||
color:#4E4E4E;
|
||||
}
|
||||
.contentContainer .description dl dd, .contentContainer .details dl dd, .serializedFormContainer dl dd {
|
||||
margin:5px 0 10px 0px;
|
||||
font-size:14px;
|
||||
font-family:'DejaVu Sans Mono',monospace;
|
||||
}
|
||||
.serializedFormContainer dl.nameValue dt {
|
||||
margin-left:1px;
|
||||
font-size:1.1em;
|
||||
display:inline;
|
||||
font-weight:bold;
|
||||
}
|
||||
.serializedFormContainer dl.nameValue dd {
|
||||
margin:0 0 0 1px;
|
||||
font-size:1.1em;
|
||||
display:inline;
|
||||
}
|
||||
/*
|
||||
List styles
|
||||
*/
|
||||
ul.horizontal li {
|
||||
display:inline;
|
||||
font-size:0.9em;
|
||||
}
|
||||
ul.inheritance {
|
||||
margin:0;
|
||||
padding:0;
|
||||
}
|
||||
ul.inheritance li {
|
||||
display:inline;
|
||||
list-style:none;
|
||||
}
|
||||
ul.inheritance li ul.inheritance {
|
||||
margin-left:15px;
|
||||
padding-left:15px;
|
||||
padding-top:1px;
|
||||
}
|
||||
ul.blockList, ul.blockListLast {
|
||||
margin:10px 0 10px 0;
|
||||
padding:0;
|
||||
}
|
||||
ul.blockList li.blockList, ul.blockListLast li.blockList {
|
||||
list-style:none;
|
||||
margin-bottom:15px;
|
||||
line-height:1.4;
|
||||
}
|
||||
ul.blockList ul.blockList li.blockList, ul.blockList ul.blockListLast li.blockList {
|
||||
padding:0px 20px 5px 10px;
|
||||
border:1px solid #ededed;
|
||||
background-color:#f8f8f8;
|
||||
}
|
||||
ul.blockList ul.blockList ul.blockList li.blockList, ul.blockList ul.blockList ul.blockListLast li.blockList {
|
||||
padding:0 0 5px 8px;
|
||||
background-color:#ffffff;
|
||||
border:none;
|
||||
}
|
||||
ul.blockList ul.blockList ul.blockList ul.blockList li.blockList {
|
||||
margin-left:0;
|
||||
padding-left:0;
|
||||
padding-bottom:15px;
|
||||
border:none;
|
||||
}
|
||||
ul.blockList ul.blockList ul.blockList ul.blockList li.blockListLast {
|
||||
list-style:none;
|
||||
border-bottom:none;
|
||||
padding-bottom:0;
|
||||
}
|
||||
table tr td dl, table tr td dl dt, table tr td dl dd {
|
||||
margin-top:0;
|
||||
margin-bottom:1px;
|
||||
}
|
||||
/*
|
||||
Table styles
|
||||
*/
|
||||
.overviewSummary, .memberSummary, .typeSummary, .useSummary, .constantsSummary, .deprecatedSummary {
|
||||
width:100%;
|
||||
border-left:1px solid #EEE;
|
||||
border-right:1px solid #EEE;
|
||||
border-bottom:1px solid #EEE;
|
||||
}
|
||||
.overviewSummary, .memberSummary {
|
||||
padding:0px;
|
||||
}
|
||||
.overviewSummary caption, .memberSummary caption, .typeSummary caption,
|
||||
.useSummary caption, .constantsSummary caption, .deprecatedSummary caption {
|
||||
position:relative;
|
||||
text-align:left;
|
||||
background-repeat:no-repeat;
|
||||
color:#253441;
|
||||
font-weight:bold;
|
||||
clear:none;
|
||||
overflow:hidden;
|
||||
padding:0px;
|
||||
padding-top:10px;
|
||||
padding-left:1px;
|
||||
margin:0px;
|
||||
white-space:pre;
|
||||
}
|
||||
.overviewSummary caption a:link, .memberSummary caption a:link, .typeSummary caption a:link,
|
||||
.useSummary caption a:link, .constantsSummary caption a:link, .deprecatedSummary caption a:link,
|
||||
.overviewSummary caption a:hover, .memberSummary caption a:hover, .typeSummary caption a:hover,
|
||||
.useSummary caption a:hover, .constantsSummary caption a:hover, .deprecatedSummary caption a:hover,
|
||||
.overviewSummary caption a:active, .memberSummary caption a:active, .typeSummary caption a:active,
|
||||
.useSummary caption a:active, .constantsSummary caption a:active, .deprecatedSummary caption a:active,
|
||||
.overviewSummary caption a:visited, .memberSummary caption a:visited, .typeSummary caption a:visited,
|
||||
.useSummary caption a:visited, .constantsSummary caption a:visited, .deprecatedSummary caption a:visited {
|
||||
color:#FFFFFF;
|
||||
}
|
||||
.overviewSummary caption span, .memberSummary caption span, .typeSummary caption span,
|
||||
.useSummary caption span, .constantsSummary caption span, .deprecatedSummary caption span {
|
||||
white-space:nowrap;
|
||||
padding-top:5px;
|
||||
padding-left:12px;
|
||||
padding-right:12px;
|
||||
padding-bottom:7px;
|
||||
display:inline-block;
|
||||
float:left;
|
||||
background-color:#F8981D;
|
||||
border: none;
|
||||
height:16px;
|
||||
}
|
||||
.memberSummary caption span.activeTableTab span {
|
||||
white-space:nowrap;
|
||||
padding-top:5px;
|
||||
padding-left:12px;
|
||||
padding-right:12px;
|
||||
margin-right:3px;
|
||||
display:inline-block;
|
||||
float:left;
|
||||
background-color:#F8981D;
|
||||
height:16px;
|
||||
}
|
||||
.memberSummary caption span.tableTab span {
|
||||
white-space:nowrap;
|
||||
padding-top:5px;
|
||||
padding-left:12px;
|
||||
padding-right:12px;
|
||||
margin-right:3px;
|
||||
display:inline-block;
|
||||
float:left;
|
||||
background-color:#4D7A97;
|
||||
height:16px;
|
||||
}
|
||||
.memberSummary caption span.tableTab, .memberSummary caption span.activeTableTab {
|
||||
padding-top:0px;
|
||||
padding-left:0px;
|
||||
padding-right:0px;
|
||||
background-image:none;
|
||||
float:none;
|
||||
display:inline;
|
||||
}
|
||||
.overviewSummary .tabEnd, .memberSummary .tabEnd, .typeSummary .tabEnd,
|
||||
.useSummary .tabEnd, .constantsSummary .tabEnd, .deprecatedSummary .tabEnd {
|
||||
display:none;
|
||||
width:5px;
|
||||
position:relative;
|
||||
float:left;
|
||||
background-color:#F8981D;
|
||||
}
|
||||
.memberSummary .activeTableTab .tabEnd {
|
||||
display:none;
|
||||
width:5px;
|
||||
margin-right:3px;
|
||||
position:relative;
|
||||
float:left;
|
||||
background-color:#F8981D;
|
||||
}
|
||||
.memberSummary .tableTab .tabEnd {
|
||||
display:none;
|
||||
width:5px;
|
||||
margin-right:3px;
|
||||
position:relative;
|
||||
background-color:#4D7A97;
|
||||
float:left;
|
||||
|
||||
}
|
||||
.overviewSummary td, .memberSummary td, .typeSummary td,
|
||||
.useSummary td, .constantsSummary td, .deprecatedSummary td {
|
||||
text-align:left;
|
||||
padding:0px 0px 12px 10px;
|
||||
}
|
||||
th.colOne, th.colFirst, th.colLast, .useSummary th, .constantsSummary th,
|
||||
td.colOne, td.colFirst, td.colLast, .useSummary td, .constantsSummary td{
|
||||
vertical-align:top;
|
||||
padding-right:0px;
|
||||
padding-top:8px;
|
||||
padding-bottom:3px;
|
||||
}
|
||||
th.colFirst, th.colLast, th.colOne, .constantsSummary th {
|
||||
background:#dee3e9;
|
||||
text-align:left;
|
||||
padding:8px 3px 3px 7px;
|
||||
}
|
||||
td.colFirst, th.colFirst {
|
||||
white-space:nowrap;
|
||||
font-size:13px;
|
||||
}
|
||||
td.colLast, th.colLast {
|
||||
font-size:13px;
|
||||
}
|
||||
td.colOne, th.colOne {
|
||||
font-size:13px;
|
||||
}
|
||||
.overviewSummary td.colFirst, .overviewSummary th.colFirst,
|
||||
.useSummary td.colFirst, .useSummary th.colFirst,
|
||||
.overviewSummary td.colOne, .overviewSummary th.colOne,
|
||||
.memberSummary td.colFirst, .memberSummary th.colFirst,
|
||||
.memberSummary td.colOne, .memberSummary th.colOne,
|
||||
.typeSummary td.colFirst{
|
||||
width:25%;
|
||||
vertical-align:top;
|
||||
}
|
||||
td.colOne a:link, td.colOne a:active, td.colOne a:visited, td.colOne a:hover, td.colFirst a:link, td.colFirst a:active, td.colFirst a:visited, td.colFirst a:hover, td.colLast a:link, td.colLast a:active, td.colLast a:visited, td.colLast a:hover, .constantValuesContainer td a:link, .constantValuesContainer td a:active, .constantValuesContainer td a:visited, .constantValuesContainer td a:hover {
|
||||
font-weight:bold;
|
||||
}
|
||||
.tableSubHeadingColor {
|
||||
background-color:#EEEEFF;
|
||||
}
|
||||
.altColor {
|
||||
background-color:#FFFFFF;
|
||||
}
|
||||
.rowColor {
|
||||
background-color:#EEEEEF;
|
||||
}
|
||||
/*
|
||||
Content styles
|
||||
*/
|
||||
.description pre {
|
||||
margin-top:0;
|
||||
}
|
||||
.deprecatedContent {
|
||||
margin:0;
|
||||
padding:10px 0;
|
||||
}
|
||||
.docSummary {
|
||||
padding:0;
|
||||
}
|
||||
|
||||
ul.blockList ul.blockList ul.blockList li.blockList h3 {
|
||||
font-style:normal;
|
||||
}
|
||||
|
||||
div.block {
|
||||
font-size:14px;
|
||||
font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif;
|
||||
}
|
||||
|
||||
td.colLast div {
|
||||
padding-top:0px;
|
||||
}
|
||||
|
||||
|
||||
td.colLast a {
|
||||
padding-bottom:3px;
|
||||
}
|
||||
/*
|
||||
Formatting effect styles
|
||||
*/
|
||||
.sourceLineNo {
|
||||
color:green;
|
||||
padding:0 30px 0 0;
|
||||
}
|
||||
h1.hidden {
|
||||
visibility:hidden;
|
||||
overflow:hidden;
|
||||
font-size:10px;
|
||||
}
|
||||
.block {
|
||||
display:block;
|
||||
margin:3px 10px 2px 0px;
|
||||
color:#474747;
|
||||
}
|
||||
.deprecatedLabel, .descfrmTypeLabel, .memberNameLabel, .memberNameLink,
|
||||
.overrideSpecifyLabel, .packageHierarchyLabel, .paramLabel, .returnLabel,
|
||||
.seeLabel, .simpleTagLabel, .throwsLabel, .typeNameLabel, .typeNameLink {
|
||||
font-weight:bold;
|
||||
}
|
||||
.deprecationComment, .emphasizedPhrase, .interfaceName {
|
||||
font-style:italic;
|
||||
}
|
||||
|
||||
div.block div.block span.deprecationComment, div.block div.block span.emphasizedPhrase,
|
||||
div.block div.block span.interfaceName {
|
||||
font-style:normal;
|
||||
}
|
||||
|
||||
div.contentContainer ul.blockList li.blockList h2{
|
||||
padding-bottom:0px;
|
||||
}
|
||||