• Register

Recent questions tagged java-string

0 votes
1 answer 3 views
Problem: How to solve : java.util.arrays$arraylist cannot be cast to java.util.arraylis HELP! I need help understanding this : java.util.arrays$arraylist cannot be cast to java.util.arraylist Can someone please help fix this, I am new in java. Anyone have ideas on what I need to do to understand this? Thanks!
asked 3 days ago Ali 6.5k points
0 votes
1 answer 3 views
Problem: Why I got the error : java lang classcastexception cannot be cast to How to fix this erro:java lang classcastexception cannot be cast to Can someone please help fix this, I am new in java(exception) : java lang classcastexception cannot be cast to Any ideas on what I need to do to fix this? Thanks!
asked 6 days ago Ali 6.5k points
0 votes
1 answer 5 views
Problem: The class should have an int field named monthNumber that holds the number of the month. For example, January would be 1, February would be 2, and so forth. In addition, provide the following methods: • A no-arg constructor that sets the monthNumber field to 1. ... error : write a class named month the class should have an int field Any ideas on what I need to do to fix this? Thanks!
asked 6 days ago Ali 6.5k points
0 votes
1 answer 11 views
Problem: Hello! I just started learning programming in Java with no prior knowledge of any other programming language. Today I attempted a quiz in which there was a question that asked me to declare a string variable and name it as ‘title’. I attempted the ... follows: string title; I have not worked with strings alot. So want to know whether my answer is correct or not? Thanks!
asked Feb 25 Code Learner 7k points
0 votes
1 answer 5 views
Problem: My string contains numbers and I want to return the number it represents.
asked Feb 25 Ashty 2.3k points
0 votes
1 answer 12 views
Problem: I have the following and I get the error java.lang.String cannot be cast to [Ljava.lang.String; I have changed the Object[] to String[] because I faced the next error: java.lang.Object cannot be cast to [Ljava.lang.String;
asked Feb 22 Ali 6.5k points
0 votes
1 answer 5 views
Problem: I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug. Is == bad? When should it and should it not be used? What's the difference?
asked Feb 22 Ali 6.5k points
0 votes
1 answer 14 views
Problem Hey, I need help from you. Is there any way to call python from java. I mean how can we run a python program from java.
asked Jan 16 chris jordan 2.4k points
0 votes
1 answer 21 views
Problem: Hi there! I just got an assignment in which I had to remove the first and last character from a string in Java. I did the task using substrings. I want to know what the simplest way is to do so? Also, mention other alternatives to using the substring method. Thanks!
asked Jan 8 Code Learner 7k points
0 votes
1 answer 7 views
Problem: we are going to figure out how many times a word is repeated in the text file using a map interface method through a Java program. I don’t know how to count the number of occurrences of a word in a text file using a hash-map then you are at the right place to know your problem’s solution?
asked Dec 2, 2020 Mashhoodch 10.8k points
0 votes
1 answer 16 views
Problem: In Java, a string is an object that represents a sequence of characters or char values. There are two ways to create a String object: By string literal : Java String literal is created by using double quotes. For Example: String s=“Welcome”; By new keyword : Java String is created by using a keyword “new”. How ro fix error of attribute decode in java?
asked Dec 2, 2020 Mashhoodch 10.8k points
0 votes
1 answer 13 views
I need to check if a number is a perfect squre in java.
asked Oct 5, 2020 Daniel Anderson 4k points
0 votes
1 answer 17 views
I am finding difficulty retrive image from Mysql database in Andoid.
asked Oct 5, 2020 Daniel Anderson 4k points
0 votes
1 answer 21 views
I need to know how to print all palindrome permutations of a string in Java.
asked Oct 4, 2020 Daniel Anderson 4k points
0 votes
1 answer 7 views
I need to know how to print duplicate characters from string in Java.
asked Oct 3, 2020 Daniel Anderson 4k points
0 votes
1 answer 17 views
I am having problem or facing the issue removing last character from string in JavaScript.
asked Sep 29, 2020 Daniel Anderson 4k points
0 votes
1 answer 17 views
I am finding the answers in several blog for removing particular character from string in java.
asked Sep 29, 2020 Daniel Anderson 4k points
0 votes
1 answer 17 views
Explain their usage with the help of a program.
asked Sep 28, 2020 jagruthi 680 points
0 votes
1 answer 11 views
I am finding difficulty with non repeated characters in a string in Java.
asked Sep 26, 2020 Daniel Anderson 4k points
0 votes
1 answer 28 views
I am finding the Java code to export data from a table in database to an Excel file. Can some one from kodlogs give me the right script?
asked Sep 26, 2020 Daniel Anderson 4k points