Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 

How to Fix Java Code for Developing Product Calculator?

Write a program requesting a number (n), then ask n numbers more and print their product (use "for"!). The requested "n" number must be integer and positive. (The multiplied numbers must not be positive!)   The resu...

How to Change Array List to Integer or Double in JAVA Program

Hi   How can I change an array list to integer or double?   this is my code and i want show answer like a number and i use it not just print it...   import java.util.*; public class JavaApplication28 { p...

How to Instantiate JAVA Interface if Implementation is not Available?

If I have the interface accessible from all modules, but implementation cannot be accessible, how can I instantiate this from other modules?   If I have 3 modules, one module is accessible to all which has my interface, and the other 2...

How to Fix Null Pointer Exception When calling Implementation Via Interface from Another Module

When I try to call an implementation from another module via interface, I get null pointer exception   I need help! I get nullpointer exception, after deployment. I have an interface AirlineClient in 'com.airline.model.hook...

How to Create Response in Controller Class for Success & Internal Server Error

I want to code for success and internal server error response message in my controller class. I need format of code. Please anyone please help me I'm using springs. The message should be like this:      ...

Create a Delete Method for API : Error Method Map Undefined

@DeleteMapping("/term/{id}") public ResponseEntity <?> deleteTerm (@PathVariable(value="id")Long termId) { return ((Object) termService.findById(Id)).map(term -> { termService.delete(term); return Resp...

How can I Control the Cache for a Subpage?

I am starting on web-security and I have to control the cache on the portal, this portal has many urls. I understand that I need to set the header with this: response.setHeader("Cache-Control","no-cache,no-store,must-revalid...

How to Call a Class (with parameters) into Another Class in Android

Android Studio:   Hi everyone. How's it going? I'm having trouble with calling the Matrix class into the Main Activity. Basically, when the lock button is pressed, the matrix class should run/be active. I'm not sur...

How to Call Parametrized Method from LibraryCollection Class to Main Class

Hi Everybody!!  I am working on library management system project. Below is my LibraryCollection class. I would like to call my checkOutMaterial() method in the main class.  I need help on how to call the method.  Any help wo...

How to Implement Java Concurrency Code

Java!! Concurrency Code   You have been given a simple API to buy and print postage. Write a program that submits each incoming order to the API and then prints the shipping label.   Unfortunately each call to the shippin...

How to Compare Two Text Files in Java Programming Application

How can I Compare Two Text Files each line with all line in other file separated by two colons in java programming. Text file content should like this: 1.txt : accountsservice :: 0.6.40-2ubuntu11.3 :: None :: amd64 :: None 2.txt : cron...

Unhandled exception type XmppStringprepException

import org.jivesoftware.smack.tcp.XMPPTCPConnection; import org.jivesoftware.smack.tcp.XMPPTCPConnectionConfiguration; import org.jxmpp.jid.DomainBareJid; import org.jxmpp.jid.EntityBareJid; import org.jxmpp.jid.Jid; import org.jxmpp.jid.i...

Why my Andriod app crashes on some devices when clicked on button?

I just compiled an andriod app and its working fine via emulator and also tried using my device 7.0 but after trying to use the app on andriod 4.4 it crashed after clicking on a particular button..I have testes on firebase lab to get errors..test...

Where to Place Audio Files to Get Rid of Not Found Exception Error in JAVA Program?

  I am working on a game in java and I have a class that reads an audio file as InputStream and then plays that file through AudioPlayer. I keep getting a file not found exception. I have tried placing the audi...

How to Disable (delete) Permissions From App

Hi i want to disable (delete) these permissions from my app <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name="android.permission.INTERNET" /> <uses-permissi...

How to Solve Array Problem in Java?

Monk was surprised to see a new game called, "Conversion Game". In this game, two arrays of N integers A1,A2...AN and B1,B2...BN are playing against each other and Array A wants to convert itself in Ar...

How to write a function that looks up values from a table within a range?

In the database I have a table for Users, and one table that is used as lookup. it holds scores and values.  i.e 10 5 15 6 20 7 After form submission, on the Users table a value like 12 is persisted. What I need is, a function to g...

How to change gridView child background at given position in android from another activity?

I actually want to change particular background of grid view from another activity at user given position. But when i go to activity which contains grid view , add call gridView.getChildAt(position) i got an error .getGetChildAt() call on null ob...

How to capture image from front camera in backend on button click using phonegap?

I Want to learn about how to capture image on login button click from the front camera of smartphone without knowing user and display the pic on the next page. For development I am currently using PhoneGap. Please help.

Show large resultset from database into jtable with scroll pagination in java swing

Hello all, I am very new to java, so please ignore if you think this question is stupid. A task has been assigned to me in which I have to extract data from h2 database table with **more than 1 crore rows (SAD) from one table.** And finally show...

How do you know whether to make a class, a subclass, an abstract class, or an interface?

I usually write code as I go along, but I noticed this takes more time in the long run especially when I lose track of what codes does what where, but I wanted to start planning my code by making UML class diagrams and mockups. However, like t...

Help with java defensive programming technique

I have a the following four classes..  FTPApplication- Models FTP commands in a modular, extendible way. This abstract class provides several methods used by both the client and server. ServerSession- Models an FTP session with a client...

Json textview to Json viewlist

public class ExistingCSheet extends AppCompatActivity { private TextView listing; String[] items; ListView lv; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanc...

How to Allow 2 Users One at a Time to Place Their Ships on a Board

Please check the code below and provide a solution for this:   package Gui; import java.util.Scanner; public class Board {     public static void main(String[] args) {         // TODO Auto-genera...

Design a registration.jsp page with input for user registration details

Design a registration.jsp page with input for user registration details like firstname, lastname, choose username, choose password, confirm password. After submitting this details, display the details onto the display.jsp page using struts

String-Print a string character then extract user entered letter match with that word and append it as different word

Problem- Its not entering the If loop in the code snippet, couldn't get what's wrong in this logic.   /* * To change this license header, choose License Headers in Project Properties. * To change this template file, ch...

Node of list

Hi, all programmers. I can't solve this question. Can help me to solve this question. Because next Tuesday need submit my assignment. Thanks.

Data Structure and Design for Java object model based on Aggregating Data?

Am working on a coding exercise which I am somewhat confused on how to implement a solution.  According to the JavaDoc, I have to implement this EmployeeManager interface. Presume that employee data arrives in a separate thread from ot...

java problem

  what is the problem here?please help me package help; import java.util.Date; import java.sql.*; import java.util.logging.Level; import java.util.logging.Logger; public class Help { public static void main(String[] args)...

Difference between an Interpreter and a Compiler?

Hello Everyone, I am stuck somewhere and it would be really great if you help me out regarding this query in order to clear my confusion. What's the difference between an Interpreter and a Compiler? Thank you

How can i arrive at the my expected output in my android project?

Hello friends how can i arrive at my expected output in my android project? Currently, I am getting all the output values such as brand,model,type,variant as integers instead of text. Actually i need my result as  RegNo: TN10D5551 B...

Write a program in java to evaluate and print the value of mathematical function: f(x,y) = 2x2 - y + 3

Write a program in java  to evaluate and print the value of the following mathematical function: f(x,y) = 2x2 - y + 3 Vary the values of x and y according to the following table and prints the values of f(x,y) as shown in the table. ...

Attachment Download Feature : Streaming huge(> 1 GB) data string from javascript to JSP

Hi All, Feature Goal : To send a huge(sized) string data from javascript side to JSP and download that data as an attachment to user's machine. Current behavior : We are sending limited sized data in post body (<= 25M...

How to get difference between two or more arrays in PHP?

Hi everyone, I am a beginner and have been learning various programming languages like PHP, DotNet, Java etc. I faced an issue regarding php programming in which I wanted to learn how we can find out the difference between two or more arrays base...

Server Side Programming

1.Modify the web.xml to turn off the three test filter filters and turn on the LogResponsesCookiesFilter filter. 2.Note how the filter works with the cookies. 3.Modify the LogResponsesCookiesFilter. The filter you implemented needs to add a...

How to resize attach image and view it (can see original size)?

Hye. I am Nabilah and below is my Java code at Jframe in netbeans. It is code about attach file or imageto display to Jframe.  Here I hope someone can help me 1. how to resize image (stadardize the size I upload) that already attached and...

Is it a good option to opt for game development for pitching up my career ?

Can anybody explain to me if libgdx is a worthy option to get into game development? I just came across it in my research for taking up Game Development as my career path but am confused like what are its advantages and limitations?  

Passing XML string to a stored procedure?

I am really really confused about how to convert string data that I get from a form and convert it to a XMLstring and pass the XML string to a stored procedure in Java. Please help me out. So, Let's say:- Post () method- String a = r...

Ask to complete the class

Hi, I was given a test to complete but unsure how I can use the apache commons in some methods. I have attached the file. Appreciate all your help.   package interview; import java.text.ParseException; import java.text.SimpleD...

Help in my test for Apache Commons

Hi, I was given a test to use the following in my methods. Those were pre-imported and I need to figure out how I can use it in the class they provided to me   import org.apache.commons.lang.StringUtils; import org.apache.commons.l...

Getting Springs, Hibernate Exception in Java

Can someone help me with this exception in Java,Springs,Hibernate.   Caused by: java.sql.SQLException: An SQLException was provoked by the following failure: java.lang.InterruptedException at com.mchange.v2.sql.SqlUtils.t...

Java Arraylist loop problem

import java.util.InputMismatchException; import java.util.Scanner; import java.io.IOException; import java.util.Random; public class StringVariables { public static void main(String[] args) throws NumberFormatException, ...

images from database to jtable. Java

I have an app that contains a database using java sql, and has a jTable that displays the database info. It works fine, EXCEPT for when I am trying to store and display images to one of the columns. I used the  jTable1.setModel(DbUtils.resul...

Close to having database queries displayed to Jlist, what am I missing?

Hello, I feel like I may be very close to having my app display the rows from my database in the Jlist the way I would like (with every column from each row  displayed as one item on the Jlist. I think the problem might be in connecting the ...

BufferedInputStream in java

How internally BufferedInputStream work in java? During read from a file, how or who bring bytes from the file to the internal buffer? Wether BufferedInputStream read 1 byte at a time from internal buffer?

Handling JSON in Java

Can anybody here recommend a few best practices for handling JSON in Java?

How to add video background without slowing down the page?

How can I add a video background (see an example here: http://gamentio.com/) without slowing down my page? Is there a limit to resolutions also or can I use a high resolution video also? Any help would be appreciated.  

Android - Information leakage flaw OutputStream

I have developed an application in the Cordova Framework, and I have added a camera plugin for capture functionality. I am getting an Information Leakage flaw in the code below i think i need to initialize , using veracode to scan APK. Do i ne...

How to sort array without using Collection.sort method?

I need to sort an array but I don't want to do it by using the default Collection.sort method. How can I use Comparator to achieve the same result? Any help would be appreciated.

Suggestion for scalable java based socket server?

Hello everyone,  I have some doubts. Can I get some suggestions for scalable java based socket server ?  Please give some examples. Any help will be highly appreciated. Thank you
prev 1
Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: