Java Articles

Page 436 of 450

What are Java methods equivalent to C# virtual functions?

Sharon Christine
Sharon Christine
Updated on 30-Jul-2019 616 Views

All instance methods in Java are virtual except, static methods and private methods.

Read More

CamelCase in Java naming conventions

Ankitha Reddy
Ankitha Reddy
Updated on 30-Jul-2019 974 Views

Java follows camel casing for objects, class, variables etc. If a name is having multiple words, the first letter is small then consecutive words are joint with the first letter as a capital case. Consider the following example − Taxation Department Class - TaxationDepartment Object - taxationDepartment Method - getTaxationDepartmentDetails Variable - taxationDepartment

Read More

CamelCase in Java naming conventions

Ankitha Reddy
Ankitha Reddy
Updated on 30-Jul-2019 974 Views

Java follows camel casing for objects, class, variables etc. If a name is having multiple words, the first letter is small then consecutive words are joint with the first letter as a capital case. Consider the following example − Taxation Department Class - TaxationDepartment Object - taxationDepartment Method - getTaxationDepartmentDetails Variable - taxationDepartment

Read More

How to use R in Java-8 regex.

Arnab Chakraborty
Arnab Chakraborty
Updated on 30-Jul-2019 569 Views

\R matches any line break as defined by the Unicode standardPattern p = Pattern.compile("\R");Unicode line-break sequence is equivalent to \u000D\u000A|[\u000A\u000B\u000C\u000D\u0085\u2028\u2029]

Read More

Java is also not pure object-oriented like c++

Pythonista
Pythonista
Updated on 30-Jul-2019 467 Views

the main() method in Java code is itself inside a class. The static keyword lets the main() method which is the entry point of execution without making an object but you need to write a class. In C++, main() is outside the class and writing class it self is not mandatory. Hence, C++ is not a pure object oriented language bu Java is a completely object oriented language.

Read More

compareTo() definition mistake?

Pythonista
Pythonista
Updated on 30-Jul-2019 234 Views

The example works correctly. The compareTo() method is called by a string object and takes another string object as argument. The return value is integer and is difference in Unicode values of characters of respective strings when they are not equal. The value can be -ve, 0 or +ve.

Read More

Sum of all proper divisors of a natural number in java

Arjun Thakur
Arjun Thakur
Updated on 30-Jul-2019 585 Views

Following is the Java program which prints all the sum of all the divisors of a given number.

Read More

Sum of all proper divisors of a natural number in java

Arjun Thakur
Arjun Thakur
Updated on 30-Jul-2019 585 Views

Following is the Java program which prints all the sum of all the divisors of a given number.

Read More

branching statement in Java

Kumar Varma
Kumar Varma
Updated on 30-Jul-2019 860 Views

Java programming language provides following types of decision making or branching statements.Java programming language provides following types of decision making statements.Sr.No.Statement & Description1if statementAn if statement consists of a boolean expression followed by one or more statements.2if...else statementAn if statement can be followed by an optional else statement, which executes when the boolean expression is false.3nested if statementYou can use one if or else if statement inside another if or else if statement(s).4switch statementA switch statement allows a variable to be tested for equality against a list of values.

Read More

branching statement in Java

Kumar Varma
Kumar Varma
Updated on 30-Jul-2019 860 Views

Java programming language provides following types of decision making or branching statements.Java programming language provides following types of decision making statements.Sr.No.Statement & Description1if statementAn if statement consists of a boolean expression followed by one or more statements.2if...else statementAn if statement can be followed by an optional else statement, which executes when the boolean expression is false.3nested if statementYou can use one if or else if statement inside another if or else if statement(s).4switch statementA switch statement allows a variable to be tested for equality against a list of values.

Read More
Showing 4351–4360 of 4,498 articles
« Prev 1 434 435 436 437 438 450 Next »
Advertisements