Decimal to Hexadecimal Converter
Hexadecimal value:
Hex to Decimal ConverterHex to Decimal Converter
Decimal Value:
Binary to Decimal ConverterIt is all about java. Writings on java technology, programming concepts and knowledge articles especially for beginners
Hexadecimal value:
Hex to Decimal ConverterDecimal Value:
Binary to Decimal ConverterClasses and objects both are treated in similar way in all programming languages. Java is not exception.
Consider a physical class room with lot of real world objects. What we Observe in class room..?
So, a programmer needs to instruct the computer, how to create a class room object and it's subsequent objects. like, chair, table, teacher and student etc.
If programmer wants to create or develop a School application, he would need to create:
Let us now create School application with above mentioned objects and classes using java programming language.
public class School_Application{
public Student students;
public Teacher teachers;
public ClassRoom classRoom;
public School_Application(Student students, Teacher teachers, ClassRoom classRoom){
this.students = students;
this.teachers = teachers;
this.classRoom = classRoom;
}
}
Subsequently, programmer needs to create, Student, Teacher and ClassRoom classes and respective objects in main() method.
Objects in java are created using new operator. Example:
Happy coding! :)
Writing a coding solution to a problem can be done in many ways. If the solution can be obtained with less number of code lines, then it is easy to understand and maintain.
But what if code is large with having millions of lines. Moreover maintenance and readability becomes difficult as the code base grows... Right?
Every programming language mandates few norms in order to name variables, classes and functions etc. For ex: Java uses class names first letter to be a upper case and rest to be lower case letters.
But if we dig little bit more, naming conventions are not limited to only upper case or lower case letters and using alphanumeric letters etc.
Naming a variable must be enough concise as naming your first child's name...
int final static MAX_LENGHT = 2; [Correct]
Cyclomatic complexity is a measure or metric to estimate complexity level of a snippet or block of code.
Usually developing a large and scalable application, requires better design. Adhering to SOLID principles yields better scalable and easily maintainable applications.
There are five SOLID principles. They are:
DRY stands for Do Not Repeat Yourself. Sometimes, There could be a need to use same or similar set of lines of code to be used multiple times in the same application. For ex. String utilities, DB connections or updating records in database etc.
Writing frequently used code snippets multiple times is not a good practice. Instead move this code to a function or method and use this method in places where ever required.
Sometimes there are some lines or instructions in code base, which are completely not executed in all cases at all. This is considered as dead code.
Dead code reduces the quality with respect to the readability.
The reason for this difference is, the pattern of comments is identified by API document generator tools and generates API documents.
Swing library and it's categorization of components and controls Basically, Swing library provides around 50+ components. These all com...