To check whether the entered value is whitespace or not in Java, use the Character.isWhitespace() method.We have a value to be checked.char val = ' ';Now let us use the Character.isWhitespace() method.if (Character.isWhitespace(val)) { System.out.println("Value is a Whitespace!"); } else { System.out.println("Value is not a Whitespace"); }Let us see the complete example now to check whether the entered value is whitespace or not in Java.Example Live Demopublic class Demo { public static void main(String []args) { char val =' '; System.out.println("Value: "+val); if (Character.isWhitespace(val)) { ... Read More
Now let us see a program of Intel 8085 Microprocessor. This program is mainly for adding multi-digit BCD (Binary Coded Decimal) numbers.Problem StatementWrite 8085 Assembly language program to add two multi-byte BCD (Binary Coded Decimal) numbers. DiscussionWe are using 4-byte BCD numbers. The numbers are stored into the memory at location 8501H and8505H. One additional information is stored at location 8500H. In this place, we are storing the byte count. The result is stored at location 85F0H.The HL pair is storing the address of first operand bytes, the DE is storing the address of second operand bytes. C is holding the ... Read More
To check whether the entered character is a digit, whitespace, lowercase or uppercase, you need to check for the ASCII values.Let’s say we have a value in variable “val”, which is to be checked.For Lower Case.if(val >= 97 && val = 65 && val = 48 && val = 97 && val = 65 && val = 48 && val = 97 && val = 65 && val = 48 && val
Use the valueOf() method in Java to copy char array to string. You can also use the copyValueOf() method, which represents the character sequence in the array specified. Here, you can specify the part of array to be copied.Let us first create a character array.char[] arr = { 'p', 'q', 'r', 's' };The method valueOf() will convert the entire array into a string.String str = String.valueOf(arr);The following is an example.Example Live Demopublic class Demo { public static void main(String []args) { char[] arr = { 'p', 'q', 'r', 's' }; String str = String.valueOf(arr); ... Read More
To store Unicode in a char variable, simply create a char variable.char c;Now assign unicode.char c = '\u00AB';The following is the complete example that shows what will get displayed: when Unicode is stored in a char variable and displayed.Example Live Demopublic class Demo { public static void main(String []args) { int a = 79; System.out.println(a); char b = (char) a; System.out.println(b); char c = '\u00AB'; System.out.println(c); } }Output79 O «
In this program, we will see how to add a block of data using the 8085 microprocessor.Problem StatementWrite 8085 Assembly language program to add N 1-byte numbers. The value of N is provided.DiscussionIn this problem, we are using location 8000H to hold the length of the block. The main block is stored from address 8010H. We are storing the result at location 9000H and 9001H. The 9000H holding the lower byte, and 9001H is holding the upper byte.Repeatedly we are taking the number from the memory, then adding it with the accumulator and increase the register E content when carry ... Read More
There can be no doubt about the critical role that community media can play in strengthening democracy at the grass-root level. For most folks in urban areas, especially in Tier I, II and even III cities this issue might not generate much interest, but for those in the smaller towns and villages, this is one issue that will spark immediate interest. That's because folks living in such areas that are classified as rural, don't take a lot of things for granted like their counterparts in cities do.Keep An Insight of the Local PoliticsMost of us in cities don't even know ... Read More
Using 16-bit address, 8085 can access one of the 216= 64K locations. As a single hexadecimal digit can be expressed in4-bit notation so, in 8085, memory address can be expressed using four hexadecimal digits. Similarly, for convenience, we can represent all 8085 CPU registers as A, B, C etc. using binary notations. Internally 8085 specifies these registers using 0s and 1s only. So3-bits are just enough to represent a register. The 3-bit register codes for the registers of 8085 are shown in the following tableWith 3-bit register code, eight registers can be specified in maximum as 23= 8. On the ... Read More
In this mode, the 8/16-bit data is specified in the instruction itself as one of its operand. For example MVI E, ABH: means ABH is copied into register A. Here the operand is immediately available in the instruction.MVI E ABHBeforeAfter(A)Any valueABHAs example, if we consider instruction MVI E, ABH then it means that ABH will be moved or copied to the register E. And, as a result, the previous value of E will get overwritten.AddressHex CodesMnemonicComment20001EMVI E, ABHE ← ABH2001ABABH as operandThis instruction will have seven T-states as shown below.Summary − So this instruction MVI E, ABH requires 2-Bytes, 2-Machine ... Read More
Recycled plastic or for that matter, any plastic when mixed with the bitumen used to build asphalt roads tend to make the roads stronger and more durable. Considering the total number of roads that are already there and newer roads that will be built in a huge country like India, the total amount of plastic waste generated by the country is way too much to be absorbed entirely in this road building and repairing activity.Hence, building roads with recycled waste plastic can be part of the overall plastic recycling efforts but on its own, it can't absorb all of the ... Read More
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP